vwjugow

chat picketlink 3

May 26th, 2014
259
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.55 KB | None | 0 0
  1.  
  2. (12:59:11) vwjuicew: yeah, that's another custom class
  3. (12:59:39) pedroigor: for users ?
  4. (12:59:43) Hillkorn left the room (quit: Remote host closed the connection).
  5. (13:00:00) vwjuicew: for Roles
  6. (13:00:21) pedroigor: why not use a different entity to map your roles ?
  7. (13:01:39) vwjuicew: http://pastebin.com/284mWXJc
  8. (13:02:50) vwjuicew: mm I'm not sure what you mean
  9. (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.
  10. (13:03:49) pedroigor: otherwise you are going to store users and roles in the same table.
  11. (13:05:07) vwjuicew: what do you mean by mapping ? out UserImpl is mapped ?
  12. (13:07:47) vwjuicew: (I got no errors, I'm checking db now)
  13. (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).
  14. (13:09:03) vwjuicew: oh ok
  15. (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 ..
  16. (13:09:51) vwjuicew: yeah we have RoleTypeEntity
  17. (13:10:05) pedroigor: put it there ... the UserRoleImpl ..
  18. (13:10:05) vwjuicew: I've now chaged it to map UserImplRoel
  19. (13:10:21) vwjuicew: anyways, I checked db and no rows in the tables
  20. (13:10:50) vwjuicew: I added this to persistence.xml <class>com.magick.models.shared.UserImpl</class> <class>com.magick.models.shared.UserRoleImpl</class>
  21. (13:11:00) pedroigor: no you don't need them :)
  22. (13:11:05) vwjuicew: ok
  23. (13:11:06) pedroigor: those are not JPA entities ..
  24. (13:11:09) pedroigor: did you commit the changes ?
  25. (13:11:39) vwjuicew: mm commit? you have access to out repo ? haha
  26. (13:11:54) pedroigor: lol
  27. (13:12:00) pedroigor: i mean, the transaction ...
  28. (13:12:10) pedroigor: to your app ..
  29. (13:12:54) vwjuicew: the changes? yeah, I'm compiling again
  30. (13:13:25) vwjuicew: if you want to check out persistence, it's still as in my post. https://community.jboss.org/thread/241382.
  31. (13:14:36) pedroigor: you are using RESOURCE_LOCAL transactions ..
  32. (13:14:49) pedroigor: make you sure you are flushing/commiting the changes to the database ..
  33. (13:15:19) pedroigor: btw, did you configure Hibernate to print the SQL statements ?
  34. (13:16:12) vwjuicew: nop, Ill change that
  35. (13:17:33) vwjuicew: would this help ? <property name="hibernate.connection.autocommit" value="true" />
  36. (13:17:37) vwjuicew: I had it in false
  37. (13:17:49) pedroigor: not sure, try it out ...
  38. (13:27:47) vwjuicew: ok, im seeing hibernate queries now
  39. (13:29:31) vwjuicew: pedroigor: but I don't see any query after making identityManager.add(account);
  40. (13:29:58) vwjuicew: btw, do you think we need IDM ? maybe we don't even need it
  41. (13:30:06) pedroigor: vwjuicew: maybe you can try to inject the EntityManager and flush it after calling add ?
  42. (13:30:21) vwjuicew: ok
  43. (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'
  44. (13:35:27) vwjuicew: hm seems I
  45. (13:35:43) vwjuicew: 'm getting an error when flushing
  46. (13:36:14) vwjuicew: I've injected it like this: @Inject @PicketLink EntityManager em;
  47. (13:36:39) vwjuicew: and I have this in other class : @Produces @PicketLink @PersistenceContext(unitName = "pu-magick") private EntityManager em;
  48. (13:39:12) pedroigor: what is the error ?
  49. (13:40:53) vwjuicew: don't know it didn't appear in console, just a min fixing that
  50. (13:43:02) mposolda left the room (quit: Quit: Odch?z?m).
  51. (13:46:13) jcacek left the room (quit: Quit: Ex-Chat).
  52. (13:47:18) vwjuicew: javax.persistence.TransactionRequiredException: no transaction is in progress
  53. (13:48:01) vwjuicew: whole stack trace http://pastebin.com/c5W37N84
  54. (13:48:04) vwjuicew: brb
  55. (13:58:06) vwjuicew: back
  56. (14:04:10) pedroigor: vwjuicew: why don't you use JTA transactions ?
  57. (14:14:20) vwjuicew: mm I think we tried once and it didn't work, let me try again
  58. (14:24:29) vwjuicew: yeap, it's failing with Servlet threw load() exception: java.lang.NullPointerException
  59. (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]
  60. (14:24:29) vwjuicew: when deploying
  61. (14:37:07) kunjan left the room (quit: Ping timeout: 240 seconds).
  62. (14:42:52) xybrek: pedroigor: hi
  63. (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.
  64. (14:51:39) pedroigor: xybrek: did you have this class in the IDM config (mappedEntity) ?
  65. (14:51:47) pedroigor: probably the same issue as the others ..
  66. (14:52:32) xybrek: pedroigor: yes I have, i have shown you the paste online earlier
  67. (14:52:54) xybrek: pedroigor: IDMConfiguration.java
  68. (14:55:07) pedroigor: xybrek: where did you find this class IdentityObject ?
  69. (14:55:34) pedroigor: there is no such class in simple schema ?
  70. (14:55:56) xybrek: pedroigor: when trying to login with Picketlink
  71. (14:56:10) pedroigor: which version r u usin ?
  72. (14:56:13) pedroigor: using ?
  73. (14:56:19) pedroigor: 2.6.0.CR2 ?
  74. (14:57:12) xybrek: picketlink-idm-schema --> version 2.5.0.Beta, when I use 2.6.0.CR2 it cannot fetch maven jars
  75. (14:58:02) xybrek: which picketlink versiopn should I use
  76. (14:59:14) xybrek: for picketlink-idm-api and picketlink-idm-impl we use 2.6.0.CR2
  77. (15:06:55) smikloso left the room.
  78. (15:11:45) sguilhen left the room (quit: Quit: Leaving.).
  79. (15:11:57) sguilhen [[email protected]] entered the room.
  80. (15:14:03) pedroigor: you should use 2.6.0.CR2 for all dependencies
  81. (15:14:19) pedroigor: i think that IdentityObject is from 2.5.0.Beta
  82. (15:14:23) pedroigor: which is pretty old :)
  83. (15:14:45) pedroigor: i would suggest you to get some code from a quickstart and adapt it to your app ...
  84. (15:14:57) pedroigor: take a look at that quickstart that i suggested ..
  85. (15:21:56) rbenevides is now known as rbenevides|lunch
  86. (15:26:13) xybrek: pedroigor: problem is picketlink-idm-schema does not have 2.6.0.CR2 repository
  87. (15:26:22) xybrek: it can't be downloaded by maven
  88. (15:26:25) xybrek: ?
  89. (15:26:50) xybrek: pedroigor: or is it even needed?
  90. (15:28:11) xybrek: pedroigor: oh I should be using picketlink-idm-simple-schema X_X
  91. (15:34:46) pedroigor: you don't need idm-simple-schema, as you are providing your custom entities ...
  92. (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 ..
  93. (15:36:33) pedroigor: xybrek: https://repository.jboss.org/nexus/index.html#nexus-search;quick~picketlink-idm-simple-schema
  94. (15:37:06) pedroigor: http://search.maven.org/#artifactdetails%7Corg.picketlink%7Cpicketlink-idm-simple-schema%7C2.6.0.CR2%7Cjar
  95. (15:42:10) pskopek left the room (quit: Quit: Leaving).
  96. (16:04:57) rbenevides|lunch left the room (quit: Quit: Quit).
  97. (16:12:53) xybrek left the room (quit: Ping timeout: 265 seconds).
  98. (16:15:09) mposolda [[email protected]] entered the room.
  99. (17:05:30) xybrek [[email protected]] entered the room.
  100. (17:05:44) xybrek: pedroigor: still here?
  101. (17:05:56) pedroigor: xybrek: hey
  102. (17:06:26) xybrek: pedroigor: i think im getting near on making picketlink run, let me share the logs
  103. (17:07:03) pedroigor: ok
  104. (17:07:38) xybrek: pedroigor: http://www.pastekit.com/gG8
  105. (17:09:53) pedroigor: looks like you have multiple producer for the EntityManager qualified with the @PicketLink annotation ..
  106. (17:11:36) xybrek: pedroigor: oh, yeah i see it now
  107. (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
  108. (17:17:33) jbossbot: jira [WELD-001318] Redirected to: https://issues.jboss.org/si/jira.issueviews:issue-xml/WELD-1318/WELD-1318.xml
  109. (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