[JBoss-user] [EJB 3.0] - Re: Relationships destroyed at ManyToMany merge on owning si

2006-07-10 Thread squishy
I have a user with id 1 and name "A" and a group with id 24 and name "B". They're in a relationship with an entry in the Join-table. Then i update "A" by doing | User u = new User(); | u.setId(1); | u.setName("Z"); | manager.merge(u); | and after that the entry in the join-table is go

[JBoss-user] [EJB 3.0] - Relationships destroyed at ManyToMany merge on owning side

2006-07-10 Thread squishy
Hello, I have two Entities, User & Group, in an m:m relationship, User is the owning side, eager loading. Problem: if i update a user entity, its relationships are destroyed. updating a group works. How can i solve this ? View the original post : http://www.jboss.com/index.html?module=bb&op=v

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

2006-06-28 Thread squishy
Don't you have a relationship on EJB level so you can do student.getSubjects() instead of going through the trouble of doing a query? Looks awful complicated to me :) View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3953977#3953977 Reply to the post : http://w

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

2006-06-27 Thread squishy
I think you get the ConcurrentModificationException because you remove objects from the list while you're iterating over it. If you go through the list with a simple for (int i = 0; i < subjects.size(); i++) maybe it will work? View the original post : http://www.jboss.com/index.html?module=b

[JBoss-user] [EJB 3.0] - Re: Problem with delete through helper method in SessionBean

2006-06-27 Thread squishy
if i go through the user's groups and delete the user from them before i delete the user it works fine. Looks like it was repersisted through the cascading.. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3953888#3953888 Reply to the post : http://www.jboss.

[JBoss-user] [EJB 3.0] - Problem with delete through helper method in SessionBean

2006-06-26 Thread squishy
Hello, I have the following problem: I have a User entity with a ManyToMany relationship to Group, persist and merge cascading. I have a UserMgrBean session bean to access the Users. If i delete a User with a relationship by calling (umgr being a UserMgr instance) | umgr.delete(umgr.get(1));

[JBoss-user] [EJB 3.0] - Re: EmbeddedId and GeneratedValue

2006-06-08 Thread squishy
http://jira.jboss.org/jira/browse/EJBTHREE-508 You'll have to do without a composite key :) View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3949805#3949805 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3949805

[JBoss-user] [EJB 3.0] - ManyToMany: cannot simultaneously fetch multiple bags

2006-05-26 Thread squishy
I've already read a few topics about the "cannot simultaneously fetch multiple bags" problem in 4.0.4.GA, but it seems like it only applies to OneToMany relationships. I have an entity with 2 ManyToMany relationships, eager fetching, and i get the same error. The relationships are done with Li

[JBoss-user] [Persistence,JBoss/CMP, Hibernate, Database] - Number is first char in column name leads to error (MSSQL)

2006-04-12 Thread squishy
Hello, I have to use an old and big database in my application and it is best if i don't change anything like column names and stuff. Problem is, someone named a column "4_a_prinzip". Now if hibernate queries that table i get the following error: Caused by: java.sql.SQLException: [Microsoft][SQL

[JBoss-user] [EJB 3.0] - Re: EmbeddedId and GeneratedValue

2006-04-05 Thread squishy
Entity Class: | package ejbframe.entity; | | import javax.persistence.*; | | @Entity | @IdClass(UserPK.class) | @Table(name = "users") | public class User { | | private int userId; | private String name; | private String password; | | @Id @GeneratedV

[JBoss-user] [EJB 3.0] - Re: EmbeddedId and GeneratedValue

2006-04-05 Thread squishy
just realized the overiding happens because i used manager.merge instead of manager.persist . Doesn't solve my problem though.. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3934998#3934998 Reply to the post : http://www.jboss.com/index.html?module=bb&op=po

[JBoss-user] [EJB 3.0] - Re: EmbeddedId and GeneratedValue

2006-04-05 Thread squishy
I tested the same beans with new Jboss 4.0.4CR2 + EJB3CR6, the only thing that's different is that i get no errors, because the row with id 0 is simply overridden by each new entity that is added to the database. (no errors there!) No HIBERNATE_SEQUENCES table is created either. Could you be so

[JBoss-user] [EJB 3.0] - Re: EmbeddedId and GeneratedValue

2006-04-03 Thread squishy
apparently hibernate does not create an entry in HIBERNATE_SEQUENCES for my Bean with the PK class, but for the same one without pk class.. Uhm.. can you give me a hint on how to find a test suit that tests this.. ? (no clue of them test suits :o) View the original post : http://www.jboss.com/

[JBoss-user] [EJB 3.0] - Re: EmbeddedId and GeneratedValue

2006-04-03 Thread squishy
(the class has @IdClass with appropriate PK-class) | @Id @GeneratedValue(strategy=GenerationType.TABLE) | public int getUserId() { | return userId; | } | leads to a java.sql.BatchUpdateException: failed batch on the 2nd insert into the database. 1 Entity is wrote

[JBoss-user] [EJB 3.0] - Re: NamedQuery or Facade-Bean with Finder methods?

2006-04-03 Thread squishy
i thought i wouldnt declare them as NamedQueries, but only as plain Strings in the stateless's methods. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3934288#3934288 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=39342

[JBoss-user] [EJB 3.0] - Re: NamedQuery or Facade-Bean with Finder methods?

2006-04-03 Thread squishy
thanks alot, this quits my worries View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3934294#3934294 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3934294 --- This SF.Ne

[JBoss-user] [EJB 3.0] - Re: EmbeddedId and GeneratedValue

2006-04-03 Thread squishy
uh, there is one? tried several things with @GeneratedValue Annotation, but the only id i got generated was 0 :o View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3934291#3934291 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply

[JBoss-user] [EJB 3.0] - Re: NamedQuery or Facade-Bean with Finder methods?

2006-04-03 Thread squishy
well, but i have about 300 named queries if i do it with them, so i'm not sure if thats really the way to go.. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3934276#3934276 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p

[JBoss-user] [EJB 3.0] - NamedQuery or Facade-Bean with Finder methods?

2006-04-02 Thread squishy
Is it better to have lots of NamedQueries (distinguished by class, eg "Team.findAll" ) or to have Stateless Beans that execute the queries? View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3934241#3934241 Reply to the post : http://www.jboss.com/index.html?mod

[JBoss-user] [EJB 3.0] - Re: EmbeddedId and GeneratedValue

2006-04-01 Thread squishy
i thoguht so. do you have an idea for working solution? i'd be very thankful :) View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3934141#3934141 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3934141 -

[JBoss-user] [EJB 3.0] - Re: EmbeddedId and GeneratedValue

2006-03-31 Thread squishy
I think it's surprising that there's so little about composite primary keys with auto generated values yet.. Isn't it also possible that, evertime you add a new entry to the database you do a query like (Role is the entity i tried with) | "SELECT MAX(r.roleId) + 1 FROM Role r" | and take i

[JBoss-user] [EJB 3.0] - Re: encapsulate entity beans?

2006-03-24 Thread squishy
that would interest me a lot too, because i'm going to port many ejb 2.0 entities that use value objects to ejb 3.0 and i'm not sure if it's good to keep the value objects either. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3932419#3932419 Reply to the pos

[JBoss-user] [JCA/JBoss] - Re: Bean refuses to use custom datasource in jbosscmp-jdbc.x

2006-03-08 Thread squishy
hmm works with mysql.. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3928709#3928709 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3928709 --- This SF.Net email is

[JBoss-user] [JCA/JBoss] - Bean refuses to use custom datasource in jbosscmp-jdbc.xml

2006-03-08 Thread squishy
Hello, i wrote a very simple Entity Bean with a few cmp fields. I want the bean to store the fields in my postgreSQL database. I have put the postgres-ds.xml properly into the deploy folder with JNDI name PostgresDS. in jbosscmp-jdbc.xml i specified: | | | java:PostgresDS |

[JBoss-user] [JNDI/Naming/Network] - Communication Exception: Failed to retrieve stub from server

2006-03-07 Thread squishy
hello, I'm using JBoss 4.0.3SP1 with Elcipse 3.1 Jboss IDE 1.5. I wrote a simple EntityBean which seems to deploy fine (no errors). But when i try to access it with my test client app, i get the following error javax.naming.CommunicationException: Failed to retrieve stub from server 192.168.10.16

[JBoss-user] [Installation, Configuration & Deployment] - cant find org.jnp.interfaces.NamingContextFactory (Eclipse 3

2006-03-06 Thread squishy
I wrote a very simple stateless session bean to test the IDE. It only has 1 business method and i followed the steps in the java boss IDE tutorial to set up the jndi-name etc and it deploys fine. Then i wrote a simple client application in java, that is supposed to call that 1 method. But i get

[JBoss-user] [JCA/JBoss] - Re: Error: can't find data source: java:/MSSQLDS

2006-02-28 Thread squishy
still the same error as before | org.jboss.deployment.DeploymentException: Error in jbosscmp-jdbc.xml : datasource-mapping MSSQLSERVER2000 not found | with a fresh install (standard files are all standard) nowhere in my files "MSSQLSERVER2000" is mentioned! i only use "MS SQLSERVER2000"

[JBoss-user] [JCA/JBoss] - Re: Error: can't find data source: java:/MSSQLDS

2006-02-28 Thread squishy
Okay thanks a lot that seems to have done the trick with the database. thanks alot! got another error now tho ;) View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3926762#3926762 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply

[JBoss-user] [JCA/JBoss] - Re: Error: can't find data source: java:/MSSQLDS

2006-02-28 Thread squishy
i took fresh files and removed the entry from mssql-ds.xml still the same error. :( View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3926754#3926754 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3926754 -

[JBoss-user] [JCA/JBoss] - Re: Error: can't find data source: java:/MSSQLDS

2006-02-28 Thread squishy
if i do that the error message changes to org.jboss.deployment.DeploymentException: Error in jbosscmp-jdbc.xml : datasource-mapping MSSQLSERVER2000 not found which is the name from before :o seems like a quandary to me View the original post : http://www.jboss.com/index.html?module=bb&op=viewto

[JBoss-user] [JCA/JBoss] - Re: Error: can't find data source: java:/MSSQLDS

2006-02-28 Thread squishy
is there an edit button in this forum?? the error message i get (i get about 100 of the same type, but i'll post only 1 :-) ) | org.jboss.deployment.DeploymentException: Error: can't find data source: java:/MSSQLDS; - nested throwable: (javax.naming.NameNotFoundException: MSSQLDS not bound)

[JBoss-user] [JCA/JBoss] - Error: can't find data source: java:/MSSQLDS

2006-02-28 Thread squishy
Hello, I'm trying to run JBoss 4.03SP1 together with MS SQLSERVER 2000 for a company page using JSP. But I'm stuck on configuring the database. I donwloaded and installed the JDBC drivers for MSSQL2000. my mssql-ds.xml looks as follows: | | | MSSQLSERVER2000 | jdbc:micro