[JBoss Seam] - Re: Generate apps that has many to many table with seam-gen
by irVega
I will be trying exactly that with 1.2.1, hopefully later this afternoon (UK). I didn't get very far with the version current at the weekend and the forum has not given much feedback (except for the very helpful quilleashm) yet.
I will post my findings but I am not quite optimistic at this point.
Gavin, Could you or one of your colleagues please give us a bit of guidance on my previous post (MOLECULES ... see link below). Just some references about how to hand crank this will be a big help as we have not found any solution yet and no one else has posted about this with any advice, let alone a full-blown solution (note that this is for one single screen with just 4 widgets on it - I provided the full schema and even test data). It will be great for us to be able to demonstrate how this functionality can really work in SEAM but we are getting knonbbled with lots of small obstacles and what we put aside an hour for is taking several hours. I am hoping that Michale Yuan's book willl help ... the other one in print just now (Beginning SEAM) is totally useless (the author spends more time talking about what he is not going to "teach" us than giving any meaningful information).
Anyway, at the very least, if you can spare a few minutes, could you please tell us if the screen to make a MOLECULE is possible in SEAM (even without seam-gen is perfectly acceptable for now) so we can move on if there is no choice.
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=105054
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4032376#4032376
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4032376
19Â years
[JBoss Seam] - Bug: no such setter method: org.jboss.seam.core.Init.userTra
by ASavitsky
The following components.xml declaration results in exception:
<core:init user-transaction-name="java:comp/env/UserTransaction" />
java.lang.RuntimeException: Could not create Component: org.jboss.seam.core.init
| at org.jboss.seam.init.Initialization.addComponent(Initialization.java:833)
| at org.jboss.seam.init.Initialization.addComponents(Initialization.java:676)
| at org.jboss.seam.init.Initialization.init(Initialization.java:478)
| at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:33)
| at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3763)
| at org.apache.catalina.core.StandardContext.start(StandardContext.java:4211)
| at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
| at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
| at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
| at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
| at org.apache.catalina.core.StandardService.start(StandardService.java:450)
| at org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
| at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
| at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
| Caused by: java.lang.IllegalArgumentException: no such setter method: org.jboss.seam.core.Init.userTransactionName
| at org.jboss.seam.util.Reflections.getSetterMethod(Reflections.java:217)
| at org.jboss.seam.Component.initInitializers(Component.java:369)
| at org.jboss.seam.Component.<init>(Component.java:260)
| at org.jboss.seam.Component.<init>(Component.java:200)
| at org.jboss.seam.init.Initialization.addComponent(Initialization.java:823)
| ... 18 more
The XSD for the core tags (core-1.2.xsd) clearly allows the user-transaction-name as an attribute to the init tag, yet the corresponding method in Init class is protected. Was it supposed to be public? Does this one looks like a bug?
Thanks,
Alex
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4032374#4032374
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4032374
19Â years
[Security & JAAS/JBoss] - receiving both my custom callback handler AND SecurityAssoci
by sionut2
Hi,
I created a custom CallbackHandler, handed it to the LoginContext.
CallbackHandler cbHandler = new SsoTokenCallbackHandler(username, password.toCharArray());
try {
| LoginContext lc = new LoginContext("my-ctx", cbHandler);
| lc.login();
| result = true;
| } catch (LoginException e) {
| log.error("Exception during login.", e);
| result = false;
| }
|
The problem: the initialize() method of my LoginModule I'm getting called twice:
1) the first time with my custom callback handler (SsoTokenCallbackHandler). Here's what Eclipse is showing when debugging:
callbackHandler LoginContext$SecureCallbackHandler (id=142)
| acc AccessControlContext (id=157)
| ch SsoTokenCallbackHandler (id=159)
|
2) the second time with another callback handler which fails (SecurityAssociationHandler). Here's what Eclipse is showing when debugging:
callbackHandler LoginContext$SecureCallbackHandler (id=197)
| acc AccessControlContext (id=201)
| ** ch SecurityAssociationHandler (id=202) **
|
Is it normal to be called twice ? What can I do to receive a single call in my LoginModule ? (the first one)
Thank you !
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4032359#4032359
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4032359
19Â years
[Persistence, JBoss/CMP, Hibernate, Database] - Bug(?) when using @OneToMany relation, collection is not fil
by tbergman
I have 2 entity classes:
| package testing;
|
| import javax.persistence.*;
| import java.util.List;
|
| @Entity
| @Table(name = "A")
| public class A
| {
| @Id
| @Column(name = "Id")
| private String mId;
|
| @OneToMany(mappedBy = "mA")
| private List<B> mBList;
|
| //Getter and setters to the members...
| }
|
| @Entity
| @Table(name = "B")
| public class B
| {
| @Id
| @Column(name = "Id")
| private String mId;
|
| @ManyToOne
| @JoinColumn(name = "AId")
| private A mA;
|
| //Getter and setters to the members...
| }
|
The id column is of type uniqueidentifier and the database is MS SQL Server 2000.
The following code prints out '0':
| A a = mEntityManager.find(A.class, "cfaae25a-761b-4430-ba0d-566ddb9bd535");
| List<B> bList = a.getBList();
|
| System.out.println(bList.size());
|
If I have an integer as the primary key this code work without change (except for the type) and return 4 B's in the collection. But change the type to uniqueidentifier it no longer working.
I have tried the code on glassfish and there it works with uniqueidentifier as PK type.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4032355#4032355
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4032355
19Â years