I feel like you're probably hitting DERBY-6648:
https://issues.apache.org/jira/browse/DERBY-6648

Even if you don't install a Java security manager (perhaps especially
if that is so), you get a security manager anyway.

If you really, really don't want a security manager, you can say so.

Or, bite the bullet and define a security manager, and start
assembling the precise security policy that is right for your
particular situation, as in:
https://stackoverflow.com/a/52392015/193453 ,
https://db.apache.org/derby/docs/10.13/security/csecembeddedperms.html
, etc.

bryan

On Fri, May 31, 2019 at 11:58 AM Besosa, Michael
<[email protected]> wrote:
>
> We have an application that is using the Derby 10.12.1.1 embedded engine and 
> Java 8. When the app executes the SELECT shown below, we see an exception 
> with the message 'access denied org.apache.derby.security.SystemPermission( 
> "engine", "usederbyinternals" ): java.security.AccessControlException'.
>
> This application does not install a SecurityManager. I'm at a bit of a loss 
> about how to fix this.
>
> The query:
>
> SELECT
>         DeliveryEvent.AppointmentStart,
>         DeliveryEvent.Attempt,
>         DeliveryEvent.BiometricCheckTypeCode,
>         DeliveryEvent.CandidateID,
>         DeliveryEvent.DeliveryStatus,
>         DeliveryEvent.ExamLanguageID,
>         DeliveryEvent.HasNoTestListBlock,
>         DeliveryEvent.IsDisconnectedIBTDelivery,
>         DeliveryEvent.NextAppointmentID,
>         DeliveryEvent.ProcessStateCode,
>         DeliveryEvent.ProctorID,
>         DeliveryEvent.RegisteredExamVersionID,
>         DeliveryEvent.RegistrationID,
>         DeliveryEvent.SelectedFormID,
>         DeliveryEvent.SelectedExamVersionID,
>         DeliveryEvent.TerminationDate,
>         DeliveryEvent.TimeLimit,
>         DeliveryEvent.TimeLimitAdjust,
>         Clients.Client_ID AS ClientID,
>         Clients.ClientName AS ClientName,
>         ExamSeries.Code AS ExamSeriesCode,
>         ExamVersion.DriverID AS DriverID,
>         ExamLanguage.Title AS TranslatedTitle,
>         (SELECT AppUser.FirstName || ' ' || AppUser.LastName FROM 
> ((((((AssetAppUser INNER JOIN AppUser ON AssetAppUser.AppUserID = AppUser.ID) 
> INNER JOIN AssetUsage ON AssetAppUser.AssetID = AssetUsage.AssetID) INNER 
> JOIN Asset ON AssetUsage.AssetID = Asset.ID) INNER JOIN AssetType ON 
> Asset.AssetTypeID = AssetType.ID) INNER JOIN AssetTypeProperty ON 
> AssetType.ID = AssetTypeProperty.AssetTypeID AND 
> AssetTypeProperty.AssetTypePropertyValue = 'Examiner') INNER JOIN 
> AssetTypePropertyKey ON AssetTypeProperty.AssetTypePropertyKeyID = 
> AssetTypePropertyKey.AssetTypePropertyKeyID AND 
> AssetTypePropertyKey.AssetTypePropertyKeyName = 'AssetSubClass') WHERE 
> (AssetUsage.OrderItemID = DeliveryEvent.RegistrationID) FETCH FIRST 1 ROWS 
> ONLY) AS ExaminerName,
>         (SELECT Asset.Name FROM ((((Asset INNER JOIN AssetType ON 
> Asset.AssetTypeID = AssetType.ID) INNER JOIN AssetUsage ON Asset.ID = 
> AssetUsage.AssetID) INNER JOIN AssetTypeProperty ON AssetType.ID = 
> AssetTypeProperty.AssetTypeID AND AssetTypeProperty.AssetTypePropertyValue = 
> 'Vehicle') INNER JOIN AssetTypePropertyKey ON 
> AssetTypeProperty.AssetTypePropertyKeyID = 
> AssetTypePropertyKey.AssetTypePropertyKeyID AND 
> AssetTypePropertyKey.AssetTypePropertyKeyName = 'AssetSubClass') WHERE 
> (AssetUsage.OrderItemID = DeliveryEvent.RegistrationID) AND 
> (AssetType.AssetClassCode IN 
> ('Facility','Workstation','CiscoRack','TaskSchedule')) FETCH FIRST 1 ROWS 
> ONLY) AS VehicleName,
>         (SELECT COUNT(*) FROM (Accommodation INNER JOIN AccommodationStatus 
> ON Accommodation.AccommodationStatusID = 
> AccommodationStatus.AccommodationStatusID AND AccommodationStatus.StatusCode 
> = 'Granted') WHERE (Accommodation.OrderItemID = 
> DeliveryEvent.RegistrationID)) AS AccommodationCount,
>         (SELECT COUNT(*) FROM DeliveryBlockedReason WHERE 
> (DeliveryBlockedReason.DeliveryEventID = DeliveryEvent.RegistrationID)) AS 
> ReasonsBlockedCount,
>         (SELECT DeliveryEventNext.RegistrationID FROM DeliveryEvent AS 
> DeliveryEventNext WHERE (DeliveryEvent.RegistrationID = 
> DeliveryEventNext.NextAppointmentID)) AS FirstDayRegistrationID
> FROM ((((
>         DeliveryEvent
>         INNER JOIN ExamLanguage
>                 ON DeliveryEvent.ExamLanguageID = ExamLanguage.ID)
>         INNER JOIN ExamSeriesON ExamLanguage.ExamSeriesID = ExamSeries.ID)
> INNER JOIN Clients
> ON ExamSeries.Client_ID = Clients.Client_ID)
> LEFT JOIN ExamVersion
> ON DeliveryEvent.RegisteredExamVersionID = ExamVersion.ID)
> WHERE
> (DeliveryEvent.RegistrationID = 5)

Reply via email to