Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / February 2004

Tip: Looking for answers? Try searching our database.

Configuring MS SQL Server as a datasource in JBoss

Thread view: 
Florian Schwingenschloegl - 25 Feb 2004 09:20 GMT
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.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.