Sorry, "Order" is not the table name but the abstract schema name of your bean. So
change the abstract schema name instead.
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3837309#3837309
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=postin
I don't know about 3.2.4RC2 but 4.0.0DR4 implements the EJB-QL 2.1 spec, means that
hte ORDER BY clause is supported.
Your table name "Order" is in conflict with the ORDER reserved word.
Change the table name and it will be OK
View the original post :
http://www.jboss.org/index.html?module=bb&o
anonymous wrote :
| Is it permitted for the foreign key to point not to the primary key of the one
side but to a common CMP field?
|
No, the foreign key constraint must be with a primary key.
anonymous wrote :
| Moreover, I'd like to make this relationship unidirectional to the one side,
After looking carefully at your traces, I agree with you.
The error concerns the findByprimaryKey on your QuestionBean.
And the SQL string refers to a question table which is your bean name.
The datasource mapping for the QuestionBean is missing, and the datasource and
datasource mapping for the
abcolson,
For the abstract schema name, it's your bug, not the container.
And it's for the QuestionCategory bean, not the Question bean.
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3837035#3837035
Reply to the post :
http://www.jboss.org/index.html?module
anonymous wrote :
| I think maybe all the words didn't come through. I am unclear on what exactly you
suggest removing.
|
You don't need to define the findByPrimarykey finder. The container knows how to
implement it.
anonymous wrote :
| I think this might be a slip in terminology. It a
I don't know which findByPrimaryKey throws an error, but the second one (for
QuestionCategory bean) has an error. Your bean abstract schema name is
QuestionCategory not QuestionCategorybean.
It's surprising you have no errors at deployment.
But as says Erik, you can remove both.
View the origin
No matter the matching between table names and bean name, or field name and column
name, all the mapping is done in jbosscmp-jdbc.xml.
I think the problem is the space in your Question Categories. This don't work, even in
sql.
View the original post :
http://www.jboss.org/index.html?module=bb&
My address is ironbirdy40 at yahoo dot com.
I rely on you not to be victim of spamming noise.
But what happens with the new code ? the same thing or errors ?
Put both entity beans, and the client, then I can test it in my computer.
View the original post :
http://www.jboss.org/index.html?modu
Absolutly right Erik. Thanks you !
And you solve by the way the error of this topic where rberehoudougou uses a productId
cmp field and a productID in its primary key class : the same "d" lower and upper
case. Probably a bad natural reflex on the keyboard (the timing for pressing "shift"
when yo
And I continue about compound primary key errors:
To be clear, I never use it myself (I always use normalized schemas). But I try this:
The same example as above with
public String cliCode;
in the primary key class (so 2 fields).
The database creation in mySQL:
| 2004-05-30 12:23:47,844 DE
Erik,
Sorry, you teach me something, but I try both and cannot see a valuable difference.
Alex,
I apologize if you don't like my comments byt I can proove what I say. The only error
I make is that (you are right) the SQL generated for testing the entity existence is
the same for the databases).
As I say to you before, two bad things:
1) Your LectureEntity bean has a cmp field named questions, and a cmr field named also
questions. Remove the tags I indicate before:
| @ejb:persistent-field
| @jboss:column-name name="questions"
|
or rename one of them (cmp or cmr) and put the appr
Also your relationship looks strange !
| @ejb:persistent-field
| @jboss:column-name name="questions"
|
are tags for cmp fields. This means that you create both a CMR and a CMP field with
the same name. I don't advise you to do that. I'm surprising you got no errors during
deployment.
Can
It's doesn't matter (depends the client which calls theses methods. The major thing is
that your QuestionEntity class is a local one. You cannot add or get remote interfaces
of the QuestionEntity bean with a CMR getter and setter, no matter theses getter and
setters are viewed locally or remotel
I think I got it !
Your primary key class have only one field, and unfortunatly for you, JBoss 3.2.3 is
bugged : where the primary key class has only one field, the generated SQL for testing
a entity existence before its creation is incomplete (the formet depends for each
database : with MSSQL,
As your method is only viewed on the remote interface, does the QuestionEntity a local
interface of question ?
I not, It can't work because you can only work with local interfaces on CMR getters
and setters (It's the spec).
View the original post :
http://www.jboss.org/index.html?module=bb&op=
It should be
|
|
|
|
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3836803#3836803
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3836803
---
This
Are you sure your server is accessible from your client machine. Don't you have a
firewall between both ?
I always use myself this code snippet and it works fine:
| Properties prop = new Properties();
| prop.put(Context.INITIAL_CONTEXT_FACTORY,
"org.jnp.interfaces.NamingContextFactory");
OK for the naming and finder exceptions.
As your bean is a BMP, what are you doing in the finder ?
How is filled the collection. This is the start point of the problem I think, or just
in the first getID method ?
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=
Your bean seems to be a BMP one, and I suspect a transaction issue in your NPE, like
your beans are not yet loaded at the end of the finder.
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3836641#3836641
Reply to the post :
http://www.jboss.org/index.html?mo
No, definitively, I don't see any error in your descriptors.
Perhaps the error is a database issue.
You are using MySQL 5.0.0A which is not a stable version. Try with the production
release 4.0.X.
Perhaps the tag in jbosscmp-jdbc is not set, or the mySQL mapping
is not compatible with the 5.0.X
No millerm1, you can do that without any problem, I use it myself when I want to
create entity beans which have non null foreign keys (setting up a dummy value in
ejbCreate, the settting-up the cmr field in ejbPostCreate)
View the original post :
http://www.jboss.org/index.html?module=bb&op=vi
As your relation is defined through a value object, I cannot help you because I don't
use it.
But are you sure you are reach your bean through the generated value object class ?
I suggest you to look at this topic too:
http://www.jboss.org/index.html?module=bb&op=viewtopic&t=49921
I Hope it help
revendicative means "claiming your truth at the expense of those of others"
This forum is for helping each other to make everyone find its truth (means the way
where its application works). Blaming J2EE, JBoss, ER designers or ER models got
nothing to do with this forum.
So, finallly, make a choi
Even beans are loaded ot not, the collection size is always the total count because
the container get the ID's list before loading the beans.
If the size is 0, then probably your relationship is not correctly defined.
So, post the relevant snippets (descriptors, code) in order to investigate.
Vi
All the fields mapping (cmp and cmr with column names) are defined in jbosscmp-jdbc.xml
For a relationship, you can specify a tag in the tag within
the appropriate tag.
If you are using XDoclet (the best way):
| @jboss.relation
| fk-column=
|
Like you, I cannot see any errors in your descriptors. If you are sure there is no
cmp-field in jbosscmp-jdbc.xml named "company", we are facing up to a big mystery ?
Activate cmp engine traces in log4j.xml to see what happens:
Simply adds:
|
|
|
|
in the appropriate secti
You are too much revendicative to exchange with both of you. When you want to justify
yourself so much, it's suspect for me. Continue to consider everyone as newbie while
you seems to stand yourself on some cloud, nobody's care.
Nice to meet you too, but not too much !
View the original post :
have a look on this topic:
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3831917#3831917
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3836425#3836425
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3836425
No you were not dreaming, or we were all dreaming. But it seems that the server falls
down many times actually.
Its not Alex who tells you the "on-find" strategy but me.
But Alex post after me saying that you should keep your on-load strategy, I don't know
why.
on-load load the beans one by one
anonymous wrote :
| Because I am using container managed persistence (CMP) and EJB-QL is a the Query
Language?
|
EJB-QL query is for persistence with additional features, not complex queries. I agree
with you that the spec is not adapted with professional applications. I work in
industry
Not tutorial but many topics in this forum (you can use search before posting)
http://www.jboss.org/index.html?module=bb&op=viewtopic&t=49321
http://www.jboss.org/index.html?module=bb&op=viewtopic&t=47787
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3836323#3
Hi,
I think your have a problem with the primary key of the Product entity, not the
database.
Do you have a compound primary key ? (Why the primary key class is declared as
cmptest.ProductPK ?)
The error says that probably there is no field between SELECT and FROM:the SQL query
is like this
"SE
"jdwn" wrote : I watched the other topic (already watched it in a previous search),
but it's surprising me that it's impossible to have relationships over different jar's.
You watch badly !
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3836297#3836297
Reply
You can do what you want with DynamicSQL, which is specific to JBoss. But the J2EE
spec do not address your needs.
Even in any language (PL-SQL, T-SQL, C++ or whatever), you need to build dynamically
your SQL string to do what you want.
Why do you want the container do the job for you ?
View t
Post the whole entity declaration (fields) from ejb-jar and I don't understand the
remainder:
I don't give a shit about standardjbosscmp-jdbc.xml, its a system file !
I ask you jbosscmp-jdbc.xml.
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3836289#3836289
http://www.jboss.org/index.html?module=bb&op=viewtopic&t=49941
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3836277#3836277
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3836277
Post your descriptors (ejb-jar.xml and jbosscmp-jdbc.xml)
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3836262#3836262
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3836262
-
Hi Matteo,
Please let me know if it works. I'm very interrested.
Thanks.
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3836250#3836250
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3836250
??? What do you say ?
You can get null values rows in EJB-QL testing by IS NULL.
For example the EJB-QL query
| * @ejb.finder
| * view-type="remote"
| * signature="java.util.Collection
findCustomers(Pharma_EJB.interfaces.Pharma_Customer customer)"
| * query="SELECT DISTINCT OBJECT
My first post means :
Post your descriptors (ejb-jar.xml and jbosscmp-jdbc.xml) and the full error log as
possible.
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3836238#3836238
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=
The simple "IT DOES NOT WORK" let you alone against your problem !
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3836222#3836222
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3836222
Not enough info to investigate ! Post your descriptors.
The error cause can be you forgot the primkey-field tag for your entity in ejb-jar.xml
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3836221#3836221
Reply to the post :
http://www.jboss.org/index.html?
You are a little bit lazy, but nice and relevant.
I read the specs and your understanding is perfectly right.
So blame SUN, not JBOSS.
My opinion is that the spec is unperfect for relationships and many features are ugly.
For example, when you get a collection of child entities with a CMR getter,
After a look at your descriptors,
We can say that you are not using the XA driver. Try to cut out the
| 2
| 20
|
tags.
You are already using a read-ahead opion:
| on-load
| 1000
| *
|
|
But why are you using the on-load option ? With the number of beans you are loadin
Hi,
Before the crash, We said in this topic that lafr was using the 3.2.4 version, and I
said that it was working fine in the 3.2.3 version.
So, which version has most bugs ?
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3835749#3835749
Reply to the post :
Hi again,
You should use XDoclet to generate the descriptors.
The tag is :
anonymous wrote :
| @jboss.read-ahead
| strategy="on-find"
| page-size=
|
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3835747#3835747
Reply to the post :
htt
Hi westmeier,
You comfort me because my account also got lost, so I was asking myself if I was
running on a third dimension (like in a bad movie but so real ;-).
So, You says that you are using the 3.2.4 version. I have seen other recent topics
(but some are destroyed now) about the 3.2.4 versi
What a shitload of parameters in your create method !
Post your code and descriptors.
The error is in the bean creation. How is defined your primary key ?
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3836035#3836035
Reply to the post :
http://www.jboss.org/
It works fine for me under JBoss 3.2.3 with a collection of 1000 elements (with the
MSSQL XA driver).
So for me 3 solutions:
1) JDBC XA procedures perhaps not installed
2) CMP engine for JBoss 3.2.4 bugged (other topics in this forum seems to prove that).
3) Use read-ahead with fixed page size to
| java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Die Datenbank
hat ein unspezifizierter Fehler zurÃÂckgegeben
|
??? English please !
Transation type not required ?
Do you try with JBoss 3.2.3 (3.2.4 series not stable for me) ?
Try also to specify read-ahead option with a
Your precompiled jsp page must be mapped as a servlet with a "/" as url-pattern.
Use instead of in the declaration.
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3835957#3835957
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=
It is perfectly defined in the spec and the descriptor schema:
|
|
|
| The ejb-nameType specifies an enterprise beanÃÂÃÂs name. It is
| used by ejb-name elements. This name is assigned by the
| ejb-jar file producer to name the enterprise bean in the
| ejb-jar fileÃÂÃÂs deployment
I suggest you to adopt a pragmatic method. Nothing's logical in all this.
The first error talks about the getCid() getter, nothing to do with the usertDetails
field. So:
- Keep a known configuration of your beans and relationships (DO NOT CHANGE BETWEEN
POSTS).
- Activate CMP plugin traces addin
First post:
|
| UserLogin-UserDetails
|
|
| UserHasUserDetails
|
|
| id
| uid
|
|
|
|
|
|
UserDetailsPartOfUserLogin
|
|
|
Second post:
|
| UserLogin-UserDetails
|
|
| UserHasUserDetails
|
|
| id
| U
primkey-field="id" is missing in the @ejb.bean tag.
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3835910#3835910
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3835910
Your relationships seems OK. The error looks like userDetails is also declared as a
cmp-field.
Post your whole descriptors
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3835908#3835908
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting
anonymous wrote :
| I am jboss3.2.3 with mysql. I am observing a behaviour which does not make sense.
|
| I am creating an entity object and then trying to retrieve it through session
facade. Sometime findByPrimaryKey() is iving me "Object Not Found" exception and also
deleting the row f
Your descriptors are OK, means using default values.
Do you try on JBoss 3.2.3 ? I have seen many peculiarities for the ejb plugin on JBoss
3.2.4 series.
Perhaps try also to optimize loading. Is your problem occurs after a long run or from
the start ?
View the original post :
http://www.jboss.
60 matches
Mail list logo