Hi!
The 'ElementBean' entity bean I have written works fine when used with the
Hypersonic database, which constitutes the default database for JBoss.
However, when switching to MS SQL Server the following exception is raised.
All methods have unchecked access. Would someone please explain this
behaviour?
Thanks
:07:13,179 DEBUG [Element#findByPrimaryKey] Executing SQL: SELECT
Column_Name1, Column_Name2 FROM Element WHERE Column_Name1=? AND
Column_Name2=?
:07:13,320 DEBUG [Element#findByPrimaryKey] Find failed
va.sql.SQLException: [Microsoft][SQLServer 2000 Driver for
JDBC][SQLServer]SELECT permission denied on object 'Element', database
'jbossdatabase', owner 'jbossuser'.
at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown
Source)
at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
at
com.microsoft.jdbc.sqlserver.tds.TDSRequest.processErrorToken(Unknown
Source)
at
com.microsoft.jdbc.sqlserver.tds.TDSRequest.processReplyToken(Unknown
Source)
at
com.microsoft.jdbc.sqlserver.tds.TDSRPCRequest.processReplyToken(Unknown
Source)
at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processReply(Unknown
Source)
at
com.microsoft.jdbc.sqlserver.SQLServerImplStatement.getNextResultType(Unknow
n Source)
at
com.microsoft.jdbc.base.BaseStatement.commonTransitionToState(Unknown
Source)
at com.microsoft.jdbc.base.BaseStatement.postImplExecute(Unknown
Source)
at
com.microsoft.jdbc.base.BasePreparedStatement.postImplExecute(Unknown
Source)
at com.microsoft.jdbc.base.BaseStatement.commonExecute(Unknown Source)
at com.microsoft.jdbc.base.BaseStatement.executeQueryInternal(Unknown
Source)
at com.microsoft.jdbc.base.BasePreparedStatement.executeQuery(Unknown
Source)
at
org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeQuery(Wrappe
dPreparedStatement.java:302)
...
Sudsy - 25 Feb 2004 22:23 GMT
> Hi!
>
[quoted text clipped - 5 lines]
>
> Thanks
<snip>
This portion of the error message:
SELECT permission denied on object 'Element', database
'jbossdatabase', owner 'jbossuser'.
tells us that the credentials used to access the database do not permit
select access to the table named Element. You either have to "grant"
select permissions to everyone or to the user whose credentials are
being used to gain access to SQL Server. This is very basic stuff, BTW.
Florian Schwingenschloegl - 26 Feb 2004 11:30 GMT
Well, you were right, but the fact that JBoss would create a table it could
not read from afterwards puzzled me.
Thanks again
Florian
> This portion of the error message:
>
[quoted text clipped - 5 lines]
> select permissions to everyone or to the user whose credentials are
> being used to gain access to SQL Server. This is very basic stuff, BTW.