RE: [JBoss-user] (Retry) Problem with findByPrimaryKey

2002-09-08 Thread Gavin Hughes
Title: (Retry) Problem with findByPrimaryKey









 

The problem turned out to be that I wasn’t
specifying the primkey-field attribute in the XDoclet @ejb:bean tag.

 

So the generated descriptors had this
empty, hence the “missing expression” in the SQL being passed to
Oracle.

 

I guess it would be nice if JBoss
complained loudly about this when the EJB jar is deployed.

 

Thanks for the answers all.

 

 

 

-Original Message-
From: Sebastien CHAUSSON
[mailto:[EMAIL PROTECTED]] 
Sent: Friday, 6 September 2002
5:01 PM
To:
[EMAIL PROTECTED]
Subject: Re: [JBoss-user] (Retry)
Problem with findByPrimaryKey

 



How do you call this finder ?





 







- Original Message - 





From: Gavin Hughes 





To: [EMAIL PROTECTED] 





Sent: Friday,
September 06, 2002 6:26 AM





Subject:
[JBoss-user] (Retry) Problem with findByPrimaryKey





 



Hi,

I’m
getting the following error when calling the default finder
“findByPrimaryKey” for a CMP entity bean.

javax.ejb.FinderException:
Find failed: java.sql.SQLException: ORA-00936: missing expression

Can anyone
explain what this means and how I can fix it ?

I’m
using JBoss3.0.0, XDoclet 1.1.2 and Oracle 9i on Windows XP.

I
haven’t done any explicit definition of this finder or any other finder
in my Bean class – other than

XDoclet
generating a findByPrimaryKey method in the Home interface.

Thanks,

Gavin.















RE: [JBoss-user] 2 Quick Question - Xerces 2 & Oracle 9i

2002-09-08 Thread Gavin Hughes


I've got Jboss 3.0.0 using oracle 9i as the CMP datastore.

I just followed the instructions in the Getting Started guide, using the
default configuration provided for Oracle in
Jboss3.0.0/docs/examples/jca/oracle-service.xml.

You need to add part of this to login-conf.xml and the rest to
jboss-service.xml, as described in the comments in the file.



-Original Message-
From: Michael Stanley [mailto:[EMAIL PROTECTED]] 
Sent: Friday, 6 September 2002 1:56 AM
To: [EMAIL PROTECTED]
Subject: [JBoss-user] 2 Quick Question - Xerces 2 & Oracle 9i

Has anyone had any luck setting up Jboss to use Xerces v2 as their 
default XML parser?

Has anyone set up Oracle 9i DB as the default data store for CMP beans?

Seeking sample configuration ...

Thanks in advance.
-- 





---
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


---
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



Re: [JBoss-user] >Re: Two simple questions

2002-09-08 Thread kiuma

[EMAIL PROTECTED] wrote:

>>Jason Essington wrote:
>>Why not just have the teachers be assigned both a teacher and a student 
>>role? That way they will have access to everyting you have already 
>>permitted to student, and any new items only allowed for the teacher role.
>>
>
>I know this way. But I will have to assign each principle many roles. I'm not sure
>whether it is the appropriate way most people use. I know in Weblogic you can set
>one role(in weblogic it is called group) as the "children role(principle)" of 
>another role so any principle in children role is also in "father role". Or I need
>a custom LoginModule to do that?
>
>
>---
>This sf.net email is sponsored by: OSDN - Tired of that same old
>cell phone?  Get a new here for FREE!
>https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
>___
>JBoss-user mailing list
>[EMAIL PROTECTED]
>https://lists.sourceforge.net/lists/listinfo/jboss-user
>.
>
Using DB login module, try to play with SQL, you can do the same thing.



---
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



[JBoss-user] >Re: Two simple questions

2002-09-08 Thread ggngenan

>Jason Essington wrote:
>Why not just have the teachers be assigned both a teacher and a student 
>role? That way they will have access to everyting you have already 
>permitted to student, and any new items only allowed for the teacher role.

I know this way. But I will have to assign each principle many roles. I'm not sure
whether it is the appropriate way most people use. I know in Weblogic you can set
one role(in weblogic it is called group) as the "children role(principle)" of 
another role so any principle in children role is also in "father role". Or I need
a custom LoginModule to do that?


---
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



Re: [JBoss-user] Two simple JAAS questions.

2002-09-08 Thread Dain Sundstrom



[EMAIL PROTECTED] wrote:
 > hello all: After reading JAAS chapter of QuickStart and using
 > DatabaseServerLoginModule for some time, I have two questions:
 >
 > 1.I'm a little confused with the concept "roleGroup", I think the
 > table field can only be "Roles" or "CallerPrinciple" but what is the
 > use of "CallerPrinciple" ? or I misunderstand something?

JAAS is way more powerful the EJB needs, and the concept of role groups 
is basically ignored by EJB.  EJB only has the concept of roles for a 
users, and JAAS allows for a user to have many groups of many roles. 
Anyway, just always set it to "Roles" and it will work the way you expect.

 > 2.Now I have only one role "Student" and all ejbs and web resources
 > permission are set to it. My simple question is: when I need to add
 > another role "Teacher" and allow all teachers to access those ejbs
 > and web resources permited to student, of couse some resource can be
 > access by teacher and not by student, how can I make it in a easy
 > way? I don't want to change my DDs(ejb-jar.xml...) and don't want to
 > set every principle in many roles in DB table.

Unfortunately, you will have to modify the dd to change security 
settings.  That is just the way security works.


-dain



---
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



Re: [JBoss-user] How to handle NOT NULL Fields which have DEFAULTvalues in DB

2002-09-08 Thread Dain Sundstrom

Entity beans can't use database defaults.  The EJB spec requires that 
all cmp-fields be initialized to Java defaults, so the defaults will 
always be overwritten.  I suggest you set your defaults in the ejbCreate 
method.

-dain

Saroj Kumar wrote:
> Hi All,
> 
> I have a scenario which I think is very common.
> 
> Some fields are defined as NOT NULL in DB but they do have DEFAULTS set.
> If I don't include them in ejbCreate params then it fails to create any
> Record. 
> 
> Is there a way to specify that this value is to be taken from DB
> If not defined in ejbCreate.
> 
> How is this case handled? If I have to pass the value in ejbCreate()
> Then I am unable to get the benefit of DB Defaults as I need to pass 
> Them.
> 
> Any ideas??
> 
> TIA,
> Saroj
> 
> 
> 
> ---
> This sf.net email is sponsored by: OSDN - Tired of that same old
> cell phone?  Get a new here for FREE!
> https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
> ___
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user


-- 

Dain Sundstrom
Chief Architect JBossCMP
JBoss Group, LLC




---
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



Re: [JBoss-user] Java.lang.Character mapping in ORACLE 9I and ClassCastException

2002-09-08 Thread Dain Sundstrom

Are you using JBoss 3.0.0?  If so, upgrade to JBoss 3.0.1.  Characters 
are now converted into strings before setting a parameter, because it 
breaks oracle.

-dain

Saroj Kumar wrote:
> Hi All,
> 
> I am using a Java.lang.Character column which is giving me this CLASS
> CAST EXCEPTION.
> 
> java.lang.ClassCastException: java.lang.Character
> at
> oracle.jdbc.driver.OraclePreparedStatement.setObject(OraclePreparedState
> ment.java:2759)
> at
> oracle.jdbc.driver.OraclePreparedStatement.setObject(OraclePreparedState
> ment.java:2905)
> at
> org.jboss.resource.adapter.jdbc.local.LocalPreparedStatement.setObject(L
> ocalPreparedStatement.java:607)
> at
> org.jboss.ejb.plugins.cmp.jdbc.JDBCUtil.setParameter(JDBCUtil.java:156)
> at
> org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCAbstractCMPFieldBridge.setArgu
> mentParameters(JDBCAbstractCMPFieldBridge.
> java:283)
> at
> org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCAbstractCMPFieldBridge.setInst
> anceParameters(JDBCAbstractCMPFieldBridge.
> java:262)
> at
> org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.insertEntity(JDBC
> CreateEntityCommand.java:192)
> at
> org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.execute(JDBCCreat
> eEntityCommand.java:131)
> at
> org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.createEntity(JDBCStoreMa
> nager.java:450)
> at
> org.jboss.ejb.plugins.CMPPersistenceManager.createEntity(CMPPersistenceM
> anager.java:253)
> at
> org.jboss.resource.connectionmanager.CachedConnectionInterceptor.createE
> ntity(CachedConnectionInterceptor.java:270
> )
> at
> org.jboss.ejb.EntityContainer.createLocalHome(EntityContainer.java:579)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
> a:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
> Impl.java:25)
> 
> 
> 
> Has anybody tried this?//
> 
> TIA,
> sAROJ
> 
> 
> 
> ---
> This sf.net email is sponsored by: OSDN - Tired of that same old
> cell phone?  Get a new here for FREE!
> https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
> ___
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user


-- 

Dain Sundstrom
Chief Architect JBossCMP
JBoss Group, LLC




---
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



Re: [JBoss-user] Hardware spec.

2002-09-08 Thread Alwyn Schoeman

No I think he misunderstood the question.  Sadly consultant's first
response to a question is usually 'how much is it worth to you?'. Am I
correct in assuming that you wanted some realworld benchmark results and
not a customized analysis of your application?

Its like this fellow on the JBoss forums who upon someone asking an
xdoclet question had the time to go and make a remark along the lines of
'Yes you're wrong. Go ask the question on the xdoclet site'. He
obviously knew the answer, and although he obviously had the time to
answer he decided to withhold this information. What's worse is
that others on the forum supported this attitude and admonished the
other fellow for responding mildly irritated.

I'm sorry but I just had to put in my 2 cents, although I fully expect
mail from some idiots boasting about putting me on their spamassasin lists, I find
it sad that the net has changed so much over the past 10 years.


On Fri, Sep 06, 2002 at 01:40:23PM -0400, Kim, Yong wrote:
> So, when YOU ask questions to other people, do they ask for money?

-- 
Alwyn Schoeman
SMART Money Inc.

"The clock on the wall keeps moving, time stands still...
 No matter how the dice may fall, someone else always gets to call the number..."



msg20856/pgp0.pgp
Description: PGP signature


[JBoss-user] How to handle NOT NULL Fields which have DEFAULT values in DB

2002-09-08 Thread Saroj Kumar

Hi All,

I have a scenario which I think is very common.

Some fields are defined as NOT NULL in DB but they do have DEFAULTS set.
If I don't include them in ejbCreate params then it fails to create any
Record. 

Is there a way to specify that this value is to be taken from DB
If not defined in ejbCreate.

How is this case handled? If I have to pass the value in ejbCreate()
Then I am unable to get the benefit of DB Defaults as I need to pass 
Them.

Any ideas??

TIA,
Saroj



---
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



[JBoss-user] Java.lang.Character mapping in ORACLE 9I and ClassCastException

2002-09-08 Thread Saroj Kumar

Hi All,

I am using a Java.lang.Character column which is giving me this CLASS
CAST EXCEPTION.

java.lang.ClassCastException: java.lang.Character
at
oracle.jdbc.driver.OraclePreparedStatement.setObject(OraclePreparedState
ment.java:2759)
at
oracle.jdbc.driver.OraclePreparedStatement.setObject(OraclePreparedState
ment.java:2905)
at
org.jboss.resource.adapter.jdbc.local.LocalPreparedStatement.setObject(L
ocalPreparedStatement.java:607)
at
org.jboss.ejb.plugins.cmp.jdbc.JDBCUtil.setParameter(JDBCUtil.java:156)
at
org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCAbstractCMPFieldBridge.setArgu
mentParameters(JDBCAbstractCMPFieldBridge.
java:283)
at
org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCAbstractCMPFieldBridge.setInst
anceParameters(JDBCAbstractCMPFieldBridge.
java:262)
at
org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.insertEntity(JDBC
CreateEntityCommand.java:192)
at
org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.execute(JDBCCreat
eEntityCommand.java:131)
at
org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.createEntity(JDBCStoreMa
nager.java:450)
at
org.jboss.ejb.plugins.CMPPersistenceManager.createEntity(CMPPersistenceM
anager.java:253)
at
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.createE
ntity(CachedConnectionInterceptor.java:270
)
at
org.jboss.ejb.EntityContainer.createLocalHome(EntityContainer.java:579)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)



Has anybody tried this?//

TIA,
sAROJ



---
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



[JBoss-user] +xdoclet

2002-09-08 Thread Victor Batista

Hello!
I am using jboss-3.0.0 with bundled Tomcat 4.0.3. I am also using
Xdoclets.
I have a Java servlet which is a client to an EJB. I have configured
Security, but I am having some problems with the communication between the
servlet and the EJB. My servlet asks for username/password and validates
it. Calling 
"request.getUserPrincipal()" I get the right answer.

Whhen the servlet tries to access the EJB, I get the following error:
15:10:22,922 ERROR [SecurityInterceptor] No method permissions assigned to
method=create
15:10:22,932 ERROR [STDERR]
java.rmi.ServerException: checkSecurityAssociation;
nested exception is:
java.lang.SecurityException: No method permissions assigned to
method=create;


My jboss-security.xml is the following:

java:/jaas/MyTEST


Manager





test/MyTestSession
create




Manager

test/MyTestSession
*

 



The file is in the right place (directory), because I get the
security-domain working.
Isn't this file the right one to include "method-permission" declarations?

Can any one help me, please.

Thank you in advance,
Victor Batista 



---
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user