Configuring MS SQL Server as a datasource in JBoss

Discussion in 'Java' started by Florian Schwingenschloegl, Feb 25, 2004.

  1. 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)
    ....
    Florian Schwingenschloegl, Feb 25, 2004
    #1
    1. Advertising

  2. Florian Schwingenschloegl

    Sudsy Guest

    Florian Schwingenschloegl wrote:
    > 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.
    Sudsy, Feb 25, 2004
    #2
    1. Advertising

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

    Thanks again
    Florian

    "Sudsy" <> wrote in message
    news:...
    >
    > 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, Feb 26, 2004
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. JROBINSON
    Replies:
    1
    Views:
    372
  2. Demi
    Replies:
    0
    Views:
    3,937
  3. han
    Replies:
    0
    Views:
    476
  4. Jubz
    Replies:
    0
    Views:
    2,265
  5. LprzemekL
    Replies:
    0
    Views:
    521
    LprzemekL
    Apr 10, 2008
Loading...

Share This Page