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
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.
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 :
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 :
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
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
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
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
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
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)
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
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
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 :
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
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)
|
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
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
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 :
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
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
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.
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 :
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 :
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
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 ...
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
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
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
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 :
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
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
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:
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
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
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.
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
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
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,
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
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?
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
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
42 matches
Mail list logo