[keycloak-dev] aggregate modules

Stian Thorgersen stian at redhat.com
Wed Jan 28 03:27:45 EST 2015


I've seen that issue before, it's caused by the version of Bouncycastle included on WildFly. Couldn't figure out why it doesn't work as it has org/bouncycastle/asn1/DEREncodable, but replacing with the version of Bouncycastle we have works.

Once I've released 1.1.0.Final I'll take a look

----- Original Message -----
> From: "Bill Burke" <bburke at redhat.com>
> To: "Stian Thorgersen" <stian at redhat.com>
> Cc: keycloak-dev at lists.jboss.org
> Sent: Tuesday, January 27, 2015 3:58:23 PM
> Subject: Re: [keycloak-dev] aggregate modules
> 
> I give up, I'm getting:
> 
> Caused by: java.lang.NoClassDefFoundError:
> org/bouncycastle/asn1/DEREncodable
> 
>  From keycloak-core module, yet the dependency is there...I added
> bouncycastle dependency to every module and jboss-structure.xml and I'm
> still getting this exception.
> 
> On 1/27/2015 9:49 AM, Stian Thorgersen wrote:
> >
> >
> > ----- Original Message -----
> >> From: "Bill Burke" <bburke at redhat.com>
> >> To: "Stian Thorgersen" <stian at redhat.com>
> >> Cc: keycloak-dev at lists.jboss.org
> >> Sent: Tuesday, January 27, 2015 3:40:47 PM
> >> Subject: Re: [keycloak-dev] aggregate modules
> >>
> >> Got a little further...Now can't find a Bouncycastle class even though I
> >> import it everywhere...
> >>
> >> +1000 for putting this off.  This is what I was trying to suggest from
> >> the beginning.
> >
> > Oki - so for 1.1.0.Final we'll support loading providers from the
> > file-system only. By default I was thinking we could set it to:
> >
> >      "providers": [
> >          "classpath:${jboss.server.config.dir}/providers"
> >      ]
> >
> > That means to load providers someone would just put the jars into
> > 'standalone/configuration/providers'.
> >
> > I'll update docs and examples, with release coming tomorrow or Thursday.
> >
> > I think we should finish the work with extracting modules and include it in
> > 1.2.0.beta1. I appreciate if you're fed up with it so I can continue the
> > struggle if you'd like..
> >
> >>
> >> On 1/27/2015 9:17 AM, Stian Thorgersen wrote:
> >>> Does it make sense to hold off on extracting libs into modules and
> >>> supporting loading providers from modules until after 1.1.0.Final?
> >>>
> >>> It may be risky to introduce such a big change just before releasing a
> >>> final? We can still add support for loading providers from the
> >>> file-system
> >>> as that's a much smaller change and only affects custom providers.
> >>>
> >>> ----- Original Message -----
> >>>> From: "Bill Burke" <bburke at redhat.com>
> >>>> To: "Stian Thorgersen" <stian at redhat.com>
> >>>> Cc: keycloak-dev at lists.jboss.org
> >>>> Sent: Tuesday, January 27, 2015 2:08:25 PM
> >>>> Subject: Re: [keycloak-dev] aggregate modules
> >>>>
> >>>> Ok, it was meta-inf="import within jboss-structure.xml.  I had a typo in
> >>>> my persistence.xml file...I'm checking now to see if things work.  I'll
> >>>> try and implement some aggregate modules after make sure everything
> >>>> works.
> >>>>
> >>>> FYI meta-inf="import" doesn't work within a module.xml file, so I
> >>>> assumed it wouldn't work inside jboss-structure.xml...
> >>>>
> >>>> If you don't hear from me, my internet is either down or power is out,
> >>>> blizzard is here.
> >>>>
> >>>> On 1/27/2015 6:03 AM, Stian Thorgersen wrote:
> >>>>> Had a play with this and I've got an example WAR loading
> >>>>> persistence.xml
> >>>>> from a module working.
> >>>>>
> >>>>> To try it on WildFly 8.2.0.Final:
> >>>>>
> >>>>> 1. Build and deploy module + war to WildFly
> >>>>>
> >>>>> # git clone https://github.com/stianst/playtime.git
> >>>>> # cd playtime
> >>>>> # mvn install
> >>>>> # unzip jpa-jar/target/playtime-jpa-jar-1-SNAPSHOT-module.zip -d
> >>>>> $JBOSS_HOME
> >>>>> # cp jpa/target/playtime-jpa-1-SNAPSHOT.war
> >>>>> $JBOSS_HOME/standalone/deployments/
> >>>>>
> >>>>> 2. Start WildFly
> >>>>>
> >>>>> ----- Original Message -----
> >>>>>> From: "Stian Thorgersen" <stian at redhat.com>
> >>>>>> To: "Bill Burke" <bburke at redhat.com>
> >>>>>> Cc: keycloak-dev at lists.jboss.org
> >>>>>> Sent: Tuesday, January 27, 2015 8:37:09 AM
> >>>>>> Subject: Re: [keycloak-dev] aggregate modules
> >>>>>>
> >>>>>> If you commit what you have to a branch I can take a look
> >>>>>>
> >>>>>> ----- Original Message -----
> >>>>>>> From: "Bill Burke" <bburke at redhat.com>
> >>>>>>> To: keycloak-dev at lists.jboss.org
> >>>>>>> Sent: Monday, January 26, 2015 6:41:51 PM
> >>>>>>> Subject: Re: [keycloak-dev] aggregate modules
> >>>>>>>
> >>>>>>> I also tried this in jboss-deployment-structure.xml
> >>>>>>>
> >>>>>>>                 <module name="org.keycloak.keycloak-connections-jpa"
> >>>>>>> services="import">
> >>>>>>>                     <imports>
> >>>>>>>                         <include path="META-INF/**"/>
> >>>>>>>                     </imports>
> >>>>>>>                 </module>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>> On 1/26/2015 12:18 PM, Bill Burke wrote:
> >>>>>>>> Can't find the magic...Keep getting this error:
> >>>>>>>>
> >>>>>>>> 12:15:21,803 INFO
> >>>>>>>> [org.hibernate.jpa.boot.internal.PersistenceXmlParser] (MSC service
> >>>>>>>> thread 1-7) HHH000318: Could not find any META-INF/persistence.xml
> >>>>>>>> file
> >>>>>>>> in the classpath
> >>>>>>>>
> >>>>>>>>
> >>>>>>>> persistence.xml is in this module:
> >>>>>>>>
> >>>>>>>>
> >>>>>>>> <module xmlns="urn:jboss:module:1.1"
> >>>>>>>> name="org.keycloak.keycloak-connections-jpa">
> >>>>>>>>          <resources>
> >>>>>>>>              <resource-root
> >>>>>>>> path="keycloak-connections-jpa-1.1.0.Final-SNAPSHOT.jar"/>
> >>>>>>>>              <!-- Insert resources here -->
> >>>>>>>>          </resources>
> >>>>>>>>          <exports>
> >>>>>>>>              <include path="META-INF/**" />
> >>>>>>>>          </exports>
> >>>>>>>>          <dependencies>
> >>>>>>>>              <module name="org.keycloak.keycloak-core"/>
> >>>>>>>>              <module name="org.keycloak.keycloak-model-api"/>
> >>>>>>>>              <module name="javax.persistence.api"/>
> >>>>>>>>              <module name="org.jboss.logging"/>
> >>>>>>>>              <module name="javax.api"/>
> >>>>>>>>              <module name="org.hibernate" services="import">
> >>>>>>>>                  <imports>
> >>>>>>>>                  <include path="META-INF/**" />
> >>>>>>>>              </imports>
> >>>>>>>>              </module>
> >>>>>>>>          </dependencies>
> >>>>>>>>
> >>>>>>>> </module>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>> On 1/26/2015 7:26 AM, Stian Thorgersen wrote:
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>> ----- Original Message -----
> >>>>>>>>>> From: "Bill Burke" <bburke at redhat.com>
> >>>>>>>>>> To: "Stian Thorgersen" <stian at redhat.com>
> >>>>>>>>>> Cc: keycloak-dev at lists.jboss.org
> >>>>>>>>>> Sent: Monday, January 26, 2015 1:17:21 PM
> >>>>>>>>>> Subject: Re: [keycloak-dev] aggregate modules
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>> On 1/26/2015 2:43 AM, Stian Thorgersen wrote:
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>> ----- Original Message -----
> >>>>>>>>>>>> From: "Bill Burke" <bburke at redhat.com>
> >>>>>>>>>>>> To: keycloak-dev at lists.jboss.org
> >>>>>>>>>>>> Sent: Monday, January 26, 2015 3:03:40 AM
> >>>>>>>>>>>> Subject: Re: [keycloak-dev] aggregate modules
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>> On 1/24/2015 7:00 AM, Stan Silvert wrote:
> >>>>>>>>>>>>> On 1/23/2015 5:53 PM, Bill Burke wrote:
> >>>>>>>>>>>>>> Ran into a wall:
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>> I couldn't have an aggregate module.  service imports didn't
> >>>>>>>>>>>>>> seem
> >>>>>>>>>>>>>> to
> >>>>>>>>>>>>>> work so I had to create a dependency for everything within
> >>>>>>>>>>>>>> jboss-deployment-structure.xml.  I may revisit this as I had a
> >>>>>>>>>>>>>> lot
> >>>>>>>>>>>>>> of
> >>>>>>>>>>>>>> errors in my module defintions.
> >>>>>>>>>>>>> In Brno I can ask David about this.  Can you post your
> >>>>>>>>>>>>> jboss-deployment-structure.xml and your aggregate module.xml?
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>> I'm at a wall.  I can't get the JPA connections to find the
> >>>>>>>>>>>>>> Hibernate
> >>>>>>>>>>>>>> provider.  I"m not sure if it can't find persistence.xml or
> >>>>>>>>>>>>>> hibernate
> >>>>>>>>>>>>>> or
> >>>>>>>>>>>>>> what.  Tried importing hibernate in various places to no
> >>>>>>>>>>>>>> avail.
> >>>>>>>>>>>>>> Error
> >>>>>>>>>>>>>> Message isn't very helpful either:
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>> javax.persistence.PersistenceException: No Persistence
> >>>>>>>>>>>>>> provider
> >>>>>>>>>>>>>> for
> >>>>>>>>>>>>>> EntityManager named keycloak-default
> >>>>>>>>>>>>> Can you give me a scaled down reproducer for this one?  I can
> >>>>>>>>>>>>> ask
> >>>>>>>>>>>>> around
> >>>>>>>>>>>>> and see if anyone knows a solution.
> >>>>>>>>>>>>
> >>>>>>>>>>>> I think this is another service import problem.
> >>>>>>>>>>>
> >>>>>>>>>>> Loading JPA in this way will work, but it's a bit of a PITA.
> >>>>>>>>>>> META-INF/persistence.xml isn't exported/imported by default, see
> >>>>>>>>>>> https://developer.jboss.org/message/828881#828881
> >>>>>>>>>>>
> >>>>>>>>>>> If you're fed up and commit your stuff I can take a look. I've
> >>>>>>>>>>> gone
> >>>>>>>>>>> done
> >>>>>>>>>>> this in the past so should be able to get it to work again.
> >>>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>> Zoinks...I'll try importing META-INF.
> >>>>>>>>>>
> >>>>>>>>>> Are we sure we want users dealing with JBoss Modules?
> >>>>>>>>>
> >>>>>>>>> Yes ;)
> >>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>> --
> >>>>>>>>>> Bill Burke
> >>>>>>>>>> JBoss, a division of Red Hat
> >>>>>>>>>> http://bill.burkecentral.com
> >>>>>>>>>>
> >>>>>>>>
> >>>>>>>
> >>>>>>> --
> >>>>>>> Bill Burke
> >>>>>>> JBoss, a division of Red Hat
> >>>>>>> http://bill.burkecentral.com
> >>>>>>> _______________________________________________
> >>>>>>> keycloak-dev mailing list
> >>>>>>> keycloak-dev at lists.jboss.org
> >>>>>>> https://lists.jboss.org/mailman/listinfo/keycloak-dev
> >>>>>>>
> >>>>>> _______________________________________________
> >>>>>> keycloak-dev mailing list
> >>>>>> keycloak-dev at lists.jboss.org
> >>>>>> https://lists.jboss.org/mailman/listinfo/keycloak-dev
> >>>>>>
> >>>>
> >>>> --
> >>>> Bill Burke
> >>>> JBoss, a division of Red Hat
> >>>> http://bill.burkecentral.com
> >>>>
> >>
> >> --
> >> Bill Burke
> >> JBoss, a division of Red Hat
> >> http://bill.burkecentral.com
> >>
> 
> --
> Bill Burke
> JBoss, a division of Red Hat
> http://bill.burkecentral.com
> 


More information about the keycloak-dev mailing list