[JBoss-user] [EJB 3.0] - Re: Hibernate Exception When Deleting OneToMany EJB3 Entity

2006-07-02 Thread chrismalan
Hi Michael, Sorry for coming back so late. The re-persisting of the kid when you try to delete it makes me think you have a cascade-type.all or, in any case, a cascade-type that includes persist. Make the cascade-type from parent to kid merge and remove only and from the kid to parent merge

[JBoss-user] [Security JAAS/JBoss] - @RolesAllowed not working in EJB3

2006-07-02 Thread chrismalan
All session bean implementations have the required @SecurityDomain(theDomain) annotation. What does not work is that once somebody has logged in, he can call any session bean method, even those calling for a role he is not in. This is in JBoss 4.0.3. This has worked fine before in EJB 2.1.

[JBoss-user] [EJB 3.0] - Re: EJBQL help

2006-06-29 Thread chrismalan
Heaven knows what DML is. However, it sounds as if it a feature not supported for your query to be effective. Your query looks fine to me. To do the same you can use the entity manger to return the child object with id 1 and then do child.setParent(parent); View the original post :

[JBoss-user] [EJB 3.0] - Re: Dissolving a many to many relationship

2006-06-29 Thread chrismalan
Yes, I have. Then I did a subjects.clear() No exceptions or anything, but the student-subject relationship was still there in the relationship table in MySQL. I think I may even have called flush(). I did call subjects.size() before clearing. View the original post :

[JBoss-user] [EJB 3.0] - Re: Hibernate Exception When Deleting OneToMany EJB3 Entity

2006-06-28 Thread chrismalan
Hi Mike, Sometimes you just have to think in database terms. Your kids table has a foreign key field for the primary key of the table called parent. There is nothing in the parent table to give any indication of how many kids the specific parent has. What this boils down to is this: just

[JBoss-user] [EJB 3.0] - Re: Dissolving a many to many relationship

2006-06-28 Thread chrismalan
Hi Squishy, Thanks very much. That was it. However, before the code posted above I had a for(Subject s : subjects). That threw the same exceptions. This time I got a Set of subjects and turned it into an Object array and for looped through that - no problem. It didn't take long to

[JBoss-user] [EJB 3.0] - Re: org.hibernate.MappingException: Unable to find column wi

2006-06-28 Thread chrismalan
Turn your InheritanceType to SINGLE_TABLE and see if it works. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3953958#3953958 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3953958 Using Tomcat but need to do more? Need to

[JBoss-user] [EJB 3.0] - Re: New User Question: Many to Many relationship Association

2006-06-27 Thread chrismalan
Yes, as far as I kow you are absolutely right. Use the two one to many relationships and see your relationship table as a table in its own right. That is because of the extra fields. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3953738#3953738 Reply to the

[JBoss-user] [EJB 3.0] - Dissolving a many to many relationship

2006-06-27 Thread chrismalan
There is a many to many relationship between students and subjects. At the end of the year this relationship has to be dissolved so new subjects can be assigned to each student the next year. I thought it was going to be easy. First, get all the students in a list with a query. Then loop

[JBoss-user] [EJB 3.0] - Re: Dissolving a many to many relationship

2006-06-27 Thread chrismalan
To further clarify, the following two SQL queries do what I want done: delete from STUDENT_SUBJECT; and delete from STUDENT_CLASS; The second one is not mentioned in the post, but if I can get one to work, so will the other. There is a method that removes any number of stidents (comma separated)

[JBoss-user] [JBoss Eclipse IDE (users)] - Run Packaging disabled

2006-06-05 Thread chrismalan
No, it is not because Enable Packaging is not ticked. It is the JBossIDE-Eclipse-3.1.1 package and the build is M20050929-0840 The way to get around this is to select packaging configuration - untick the Enable Packaging -Apply - retick Enable Packaging and Apply agian. Everything then works

[JBoss-user] [EJB 3.0] - Access members of composite PK with EJBQL

2006-05-11 Thread chrismalan
I have two classes with composite PKs. The PK classes are annotated with @Embeddable and the IDs with @EmbeddedId. One class (table) has a composite key made up of a student primary key and a test primary key. The class is called something very original, like Student_Test. The PK is called

[JBoss-user] [EJB 3.0] - Re: problem with EJB3 QL

2006-05-11 Thread chrismalan
Sorry, can't help you with the EJBQL. But there is another way you can do this. You are using the id (PK). You can do: Assettypes type = entityManager.find(Assettypes.class, id); | entityManager.remove(type); | That will accomplish the same. View the original post :

[JBoss-user] [EJB 3.0] - Re: How to write @ManyToMany/@JoinTable if join table has th

2006-05-10 Thread chrismalan
Hi Gus, I see you posted in March. You may never see this response. Yes, you have to explicitly create another @Entity bean, say MembershipDetails Besides that, create a bean with an @Embeddable annotation as a composite primary key @Embeddable | public class PartyMemberPK implements

[JBoss-user] [EJB 3.0] - Re: Double Many to Many

2006-02-14 Thread chrismalan
Hi Emmanuel, Thanks for your answer. This is how it looks: First, the Principal - Group m-m ralationship where the principal is a member of the group The Group persistence bean @ManyToMany( cascade = {CascadeType.PERSIST, CascadeType.MERGE}, | fetch = FetchType.EAGER) |

[JBoss-user] [EJB 3.0] - Double Many to Many

2006-02-08 Thread chrismalan
This is a somewhat unusual scenario. There are persons both working for this concern and persons who are clients. They share the same database table. Then there are different groups of people. Among the staff they can be admin staff and social workers and what have you. Among the clients

[JBoss-user] [EJB 3.0] - Re: Entity Beans extending a POJO - will I ever get this to

2006-02-08 Thread chrismalan
Hi Peter, I have successfully extended from a base class in several applications. Other problems crop up so I don't have things too easy, but not this one. You will find the solution here: http://docs.jboss.org/ejb3/app-server/tutorial/singleinheritance/single.html Also, the extended class

[JBoss-user] [EJB 3.0] - Re: Urgent help!!!

2006-02-08 Thread chrismalan
Just maybe this may help. In your case B is A (has access to all methods and fields of A), but A is not B. A has only access to its own methods and fields. Trying to use methods and access fields of B through A will not work, although the opposite will. View the original post :

[JBoss-user] [EJB 3.0] - Re: Many to many plus additional value

2006-02-07 Thread chrismalan
Thanks Alximik, I suppose one will then get all the customers for a flight (or vice versa) straight from the relationship table. I am quite sure this may actually work. Thanks again. Chris View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3922090#3922090 Reply

[JBoss-user] [Beginners Corner] - Re: How to run the EJB3.0 tutrial example on MySQL?

2006-02-07 Thread chrismalan
Hi Johannes, I looked at your join date - my mistake. Hibernate is a way to access a database, not a database itself. Before EJB3 there was EJB2.1. That was a notoriously complicated way of using a database. JBoss then decided to use Hibernate, which was much closer to the present (and

[JBoss-user] [EJB 3.0] - Many to many plus additional value

2006-02-05 Thread chrismalan
This question has been asked at least twice. The answer is: use an intermediate entity to represent your assoc table I looked but could not find much on this in the Hibernate documentation. It is most likely where I did not look. I have an idea of what to do, but do not know if it right.

[JBoss-user] [Beginners Corner] - Re: How to run the EJB3.0 tutrial example on MySQL?

2006-02-05 Thread chrismalan
Hi Johannes, This is a bit late, you may never see this or may have solved the problem. The problem is: Using dialect: org.hibernate.dialect.HSQLDialect Set up your persistence.xml to use org.hibernate.dialect.MySQLDialect That should do it. Chris View the original post :

[JBoss-user] [EJB 3.0] - Re: Query against @CollectionOfElements

2006-02-05 Thread chrismalan
I'm guessing, as nobody else replied. Try select m from MyClass m join m.numbers mn where mn=4711 Give it a go and let me know. Regards, Chris View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3921771#3921771 Reply to the post :

[JBoss-user] [EJB 3.0] - Discriminator column size

2005-12-14 Thread chrismalan
I use a base class with many classes extended from it. The discriminator column was created as only a varchar(10). Needless to say, one of the classes had a longer discriminator value. Luckily it was very easy to pick up on. I changed the column to varchar(36), fixed the entry and all was

[JBoss-user] [EJB/JBoss] - EJB QL Problem

2005-07-19 Thread chrismalan
When I deploy the ear to JBoss-4.0.2 I get the following: Error compiling JBossQL statement 'select Object(o) from principalsSchema o'; - nested throwable: (org.jboss.ejb.plugins.cmp.ejbql.ParseException: Encountered principalsSchema at line 1, column 23. Was expecting one of: IN ...

[JBoss-user] [EJB/JBoss] - Re: complex primary key

2005-07-18 Thread chrismalan
Yes, it is possible to use primary keys of any complexity. Some time since I last did it, so I will be vague. Your complex primary key must be a single java class with the keys your complex key is made up of as members. I think the terminology is a Java Data Object, but I won't stake my life

[JBoss-user] [Installation Configuration] - Re: how to use jboss-4.0.1sp1 in eclipse?

2005-05-09 Thread chrismalan
What an unkind reply - the one above. You can dowload the jboss40x.server file here: http://www.csd.abdn.ac.uk/~bscharla/teaching/CS5302/practicals/jboss40x.server Hope it helps. Chris View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3876965#3876965 Reply to

[JBoss-user] [Clustering/JBoss] - Binding to multiple interfaces

2005-02-05 Thread chrismalan
Scenario: a machine with say 5 interfaces How does one get JBoss to bind to say three of these and ignore the rest? I know of the -b start-up option, but that binds JBoss to only one interface. Can one instance of JBoss bind to more than one interface? I am starting to suspect that one has to

[JBoss-user] [Installation Configuration] - Re: DHCP woes

2005-01-23 Thread chrismalan
Yep, that does it. Thanks Scott. Added d22-236-171-17.dsl.nsw.optusnet.com.au 127.0.0.1 to /etc/hosts Hopefully I'll keep this hostname for a while. View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3863301#3863301 Reply to the post :

[JBoss-user] [Installation Configuration] - Re: what are username and pwd

2005-01-22 Thread chrismalan
The username and password of a user with full access and privileges to the database in question. Mostly, the username and password of the user who creted the database. By database I don't mean MSSQL Server (the database server), but something like ClientsDatabase or whatever. Of course, in a

[JBoss-user] [Installation Configuration] - DHCP woes

2005-01-22 Thread chrismalan
Since getting the broadband JBoss does not start without problems anymore. I used to connect to the old computer via an ethernet card and use the dial-up modem of the old computer. An ISA modem which worked many years without problem. Now the same ethernet card is connected to the ASDL

[JBoss-user] [Installation Configuration] - Re: Auto restart of a JBoss instance

2005-01-20 Thread chrismalan
Thanks Bernd. View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3863021#3863021 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3863021 --- This SF.Net email is sponsored by:

[JBoss-user] [Installation Configuration] - Re: JBoss Startup Problem

2005-01-19 Thread chrismalan
Hi Gunjangupta, Do you need the Corbanaming service in your application? If not, simply remove that service and try to start again. I have no idea how to actually fix the problem. Chris View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3862824#3862824 Reply

[JBoss-user] [Installation Configuration] - Auto restart of a JBoss instance

2005-01-19 Thread chrismalan
How do I go about getting a running instance of JBoss to restart without any human intervantion if for some reason it dies? This can be a sole instance of JBoss, not necessarily an instance running in a cluster. When I look at the logs of the host where my apps are hosted (alacartejava) I

[JBoss-user] [Messaging, JMS JBossMQ] - Re: Cannot send a message to a queue

2005-01-01 Thread chrismalan
rino_salvade wrote : The initial context is normaly a RMI reference. So if no RMI server is running, this will fail. To my knowledge if you do not set the provider_URL then the NamingContext uses the VM Naming instance set by the Main MBean. | Hope this does the trick, I have not tested it.

[JBoss-user] [Messaging, JMS JBossMQ] - Cannot send a message to a queue

2004-12-28 Thread chrismalan
First of all, this works on my machine at home. The problem is with the same web-app deployed at alacrtejava. The exception is: 03:03:40,106 WARN [NamingContext] Failed to connect to localhost:1099 javax.naming.CommunicationException: Failed to connect to server localhost:1099 [Root

[JBoss-user] [Persistence CMP/JBoss] - Re: JBoss-4.0.0 and MySQL-4.0.18

2004-12-16 Thread chrismalan
Here is the cause and solution: I use Eclipse/Lomboz as an IDE. The EJBWizard (in the case of CMP beans) takes VARCHAR as the SQL type, not VARCHAR(xy). It complains for VARCHAR(xy). The XDoclet tag generated then only specifies VARCHAR as the SQL type. In the generated JBossCMPJDBC.xml

[JBoss-user] [Persistence CMP/JBoss] - JBoss-4.0.0 and MySQL-4.0.18

2004-12-16 Thread chrismalan
I have used JBoss-3.2.0 and MySQL-4.0.18 with minimal problems up to now. Things move on and I suppose I have to change, little as I like change. To test things I created a small web-app with one CMP EJB - username, password and fullname are the fields. I set up the mysql-ds.xml file,

[JBoss-user] [JBoss Getting Started Documentation] - Cannot connect to datasource

2004-11-11 Thread chrismalan
I am working my way through the JBoss4 Getting Started Guide. No problem with setting up the database tables and populating them or with connecting (as 200) to the Duke's Bank. However, the console tells me that the getConnection method in the UserBean fails. It happens at the

[JBoss-user] [HTTPD, Servlets JSP] - Some basic questions

2004-11-11 Thread chrismalan
As everyone knows, Tomcat is now the default jsp/servlet engine of JBoss. I have a few applications on the web running on JBoss/Jetty and they seem to do fine. Why the change to Tomcat? Secondly, will JBoss/Tomcat need to run behind Apache (or some other web server) in a commercial setting?

[JBoss-user] [JBoss Getting Started Documentation] - Re: where to start

2004-11-10 Thread chrismalan
Hi Zaaba, JBoss is a J2EE application server. Obviously, it can be used for JSP's and servlets without the full J2EE compliment of objects, like EJB's, messaging etc. To see it in live action look at the JBoss site, which runs on JBoss. Here is a site I have just put up. It runs on

[JBoss-user] [Installation Configuration] - java.net.BindException: Address already in use

2004-02-17 Thread chrismalan
View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3821825#3821825 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3821825 That is of course just the essence of the error message. Here is some more: 03:00:35,334 INFO