Configuring MS SQL Server as a datasource in JBoss

  • Thread starter Florian Schwingenschloegl
  • Start date
F

Florian Schwingenschloegl

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)
....
 
S

Sudsy

Florian said:
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
<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.
 
F

Florian Schwingenschloegl

Well, you were right, but the fact that JBoss would create a table it could
not read from afterwards puzzled me.

Thanks again
Florian
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top