Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (12:59:11) vwjuicew: yeah, that's another custom class
- (12:59:39) pedroigor: for users ?
- (12:59:43) Hillkorn left the room (quit: Remote host closed the connection).
- (13:00:00) vwjuicew: for Roles
- (13:00:21) pedroigor: why not use a different entity to map your roles ?
- (13:01:39) vwjuicew: http://pastebin.com/284mWXJc
- (13:02:50) vwjuicew: mm I'm not sure what you mean
- (13:02:55) pedroigor: vwjuicew: i see. so you need to map the UserRoleImpl with its own Entity, agree ? Something like RoleTypeEntity ? And remove it from the AccountTypeEntity.
- (13:03:49) pedroigor: otherwise you are going to store users and roles in the same table.
- (13:05:07) vwjuicew: what do you mean by mapping ? out UserImpl is mapped ?
- (13:07:47) vwjuicew: (I got no errors, I'm checking db now)
- (13:08:29) pedroigor: AccountTypeEntity should be used to map Account types (User, your UserImpl type). In your case you should define only @IdentityManaged(UserImpl.class).
- (13:09:03) vwjuicew: oh ok
- (13:09:12) pedroigor: UserRoleImpl.class should be mapped by a different entity, like RoleTypeEntity. Which contains the columns to store the role name, etc ..
- (13:09:51) vwjuicew: yeah we have RoleTypeEntity
- (13:10:05) pedroigor: put it there ... the UserRoleImpl ..
- (13:10:05) vwjuicew: I've now chaged it to map UserImplRoel
- (13:10:21) vwjuicew: anyways, I checked db and no rows in the tables
- (13:10:50) vwjuicew: I added this to persistence.xml <class>com.magick.models.shared.UserImpl</class> <class>com.magick.models.shared.UserRoleImpl</class>
- (13:11:00) pedroigor: no you don't need them :)
- (13:11:05) vwjuicew: ok
- (13:11:06) pedroigor: those are not JPA entities ..
- (13:11:09) pedroigor: did you commit the changes ?
- (13:11:39) vwjuicew: mm commit? you have access to out repo ? haha
- (13:11:54) pedroigor: lol
- (13:12:00) pedroigor: i mean, the transaction ...
- (13:12:10) pedroigor: to your app ..
- (13:12:54) vwjuicew: the changes? yeah, I'm compiling again
- (13:13:25) vwjuicew: if you want to check out persistence, it's still as in my post. https://community.jboss.org/thread/241382.
- (13:14:36) pedroigor: you are using RESOURCE_LOCAL transactions ..
- (13:14:49) pedroigor: make you sure you are flushing/commiting the changes to the database ..
- (13:15:19) pedroigor: btw, did you configure Hibernate to print the SQL statements ?
- (13:16:12) vwjuicew: nop, Ill change that
- (13:17:33) vwjuicew: would this help ? <property name="hibernate.connection.autocommit" value="true" />
- (13:17:37) vwjuicew: I had it in false
- (13:17:49) pedroigor: not sure, try it out ...
- (13:27:47) vwjuicew: ok, im seeing hibernate queries now
- (13:29:31) vwjuicew: pedroigor: but I don't see any query after making identityManager.add(account);
- (13:29:58) vwjuicew: btw, do you think we need IDM ? maybe we don't even need it
- (13:30:06) pedroigor: vwjuicew: maybe you can try to inject the EntityManager and flush it after calling add ?
- (13:30:21) vwjuicew: ok
- (13:31:00) vwjuicew: oh and I saw this too: 13:26:35,245 WARN [org.hibernate.ejb.internal.EntityManagerFactoryRegistry] (pool-106-thread-1) HHH000436: Entity manager factory name (pu-magick) is already registered. If entity manager will be clustered or passivated, specify a unique value for property 'hibernate.ejb.entitymanager_factory_name'
- (13:35:27) vwjuicew: hm seems I
- (13:35:43) vwjuicew: 'm getting an error when flushing
- (13:36:14) vwjuicew: I've injected it like this: @Inject @PicketLink EntityManager em;
- (13:36:39) vwjuicew: and I have this in other class : @Produces @PicketLink @PersistenceContext(unitName = "pu-magick") private EntityManager em;
- (13:39:12) pedroigor: what is the error ?
- (13:40:53) vwjuicew: don't know it didn't appear in console, just a min fixing that
- (13:43:02) mposolda left the room (quit: Quit: Odch?z?m).
- (13:46:13) jcacek left the room (quit: Quit: Ex-Chat).
- (13:47:18) vwjuicew: javax.persistence.TransactionRequiredException: no transaction is in progress
- (13:48:01) vwjuicew: whole stack trace http://pastebin.com/c5W37N84
- (13:48:04) vwjuicew: brb
- (13:58:06) vwjuicew: back
- (14:04:10) pedroigor: vwjuicew: why don't you use JTA transactions ?
- (14:14:20) vwjuicew: mm I think we tried once and it didn't work, let me try again
- (14:24:29) vwjuicew: yeap, it's failing with Servlet threw load() exception: java.lang.NullPointerException
- (14:24:29) vwjuicew: at org.hibernate.engine.transaction.internal.jta.JtaStatusHelper.getStatus(JtaStatusHelper.java:73) [hibernate-core-4.1.8.Final.jar:4.1.8.Final]
- (14:24:29) vwjuicew: when deploying
- (14:37:07) kunjan left the room (quit: Ping timeout: 240 seconds).
- (14:42:52) xybrek: pedroigor: hi
- (14:43:06) xybrek: pedroigor: what is the associated JPA entity for Entity [class org.picketlink.idm.jpa.schema.IdentityObject] does not have any mapping.
- (14:51:39) pedroigor: xybrek: did you have this class in the IDM config (mappedEntity) ?
- (14:51:47) pedroigor: probably the same issue as the others ..
- (14:52:32) xybrek: pedroigor: yes I have, i have shown you the paste online earlier
- (14:52:54) xybrek: pedroigor: IDMConfiguration.java
- (14:55:07) pedroigor: xybrek: where did you find this class IdentityObject ?
- (14:55:34) pedroigor: there is no such class in simple schema ?
- (14:55:56) xybrek: pedroigor: when trying to login with Picketlink
- (14:56:10) pedroigor: which version r u usin ?
- (14:56:13) pedroigor: using ?
- (14:56:19) pedroigor: 2.6.0.CR2 ?
- (14:57:12) xybrek: picketlink-idm-schema --> version 2.5.0.Beta, when I use 2.6.0.CR2 it cannot fetch maven jars
- (14:58:02) xybrek: which picketlink versiopn should I use
- (14:59:14) xybrek: for picketlink-idm-api and picketlink-idm-impl we use 2.6.0.CR2
- (15:06:55) smikloso left the room.
- (15:11:45) sguilhen left the room (quit: Quit: Leaving.).
- (15:11:57) sguilhen [[email protected]] entered the room.
- (15:14:03) pedroigor: you should use 2.6.0.CR2 for all dependencies
- (15:14:19) pedroigor: i think that IdentityObject is from 2.5.0.Beta
- (15:14:23) pedroigor: which is pretty old :)
- (15:14:45) pedroigor: i would suggest you to get some code from a quickstart and adapt it to your app ...
- (15:14:57) pedroigor: take a look at that quickstart that i suggested ..
- (15:21:56) rbenevides is now known as rbenevides|lunch
- (15:26:13) xybrek: pedroigor: problem is picketlink-idm-schema does not have 2.6.0.CR2 repository
- (15:26:22) xybrek: it can't be downloaded by maven
- (15:26:25) xybrek: ?
- (15:26:50) xybrek: pedroigor: or is it even needed?
- (15:28:11) xybrek: pedroigor: oh I should be using picketlink-idm-simple-schema X_X
- (15:34:46) pedroigor: you don't need idm-simple-schema, as you are providing your custom entities ...
- (15:35:23) pedroigor: that dependency is just a default entity model which provides some OOTB mapping for the basic model types: User, Role, Group, etc ..
- (15:36:33) pedroigor: xybrek: https://repository.jboss.org/nexus/index.html#nexus-search;quick~picketlink-idm-simple-schema
- (15:37:06) pedroigor: http://search.maven.org/#artifactdetails%7Corg.picketlink%7Cpicketlink-idm-simple-schema%7C2.6.0.CR2%7Cjar
- (15:42:10) pskopek left the room (quit: Quit: Leaving).
- (16:04:57) rbenevides|lunch left the room (quit: Quit: Quit).
- (16:12:53) xybrek left the room (quit: Ping timeout: 265 seconds).
- (16:15:09) mposolda [[email protected]] entered the room.
- (17:05:30) xybrek [[email protected]] entered the room.
- (17:05:44) xybrek: pedroigor: still here?
- (17:05:56) pedroigor: xybrek: hey
- (17:06:26) xybrek: pedroigor: i think im getting near on making picketlink run, let me share the logs
- (17:07:03) pedroigor: ok
- (17:07:38) xybrek: pedroigor: http://www.pastekit.com/gG8
- (17:09:53) pedroigor: looks like you have multiple producer for the EntityManager qualified with the @PicketLink annotation ..
- (17:11:36) xybrek: pedroigor: oh, yeah i see it now
- (17:17:33) xybrek: pedroigor: does this mean I still have multiple producer: [ERROR] Caused by: java.lang.Throwable: WELD-001318 Cannot resolve an ambiguous dependency between [Producer Method [EntityManager] with qualifiers [@Any @PicketLink] declared as [[method] @Produces @PicketLink public app.server.security.PicketlinkResource.getPicketLinkEntityManager()], Producer Method [EntityManager] with qualifiers [@Any @PicketLink] declared as [[method] @Produces @PicketLink p
- (17:17:33) jbossbot: jira [WELD-001318] Redirected to: https://issues.jboss.org/si/jira.issueviews:issue-xml/WELD-1318/WELD-1318.xml
- (17:17:34) jbossbot: jira [WELD-1318] numberguess GAE profile has a dependency on javax.el:el-api:jar:1.2, which doesn't seem to exist [Resolved (Done) Bug, Minor, Martin Kouba] https://issues.jboss.org/browse/WELD-1318
Advertisement
Add Comment
Please, Sign In to add comment