Discussion:
EAR deployment
r***@e1b.org
2018-06-27 16:15:18 UTC
Permalink
I seem unable to deploy EARs. I have set the catalina.policy to:
grant {
permission java.security.AllPermission;
};

I have set the work directory to "work" (and at deploy see the exploded
EAR there).

Also I have set deployOnStartup to false, autoDeploy to true, and
unpackWARs to true.

On deploy, at first matters look promising. It unpacks, initializes my
EJBs, then I get single AccessContorlException (RuntimePermistion),
followed by an infinitely repeating (every 5 seconds or so) access control
exception (FilePermission).


INFO: Created Ejb(deployment-id=CloseEventsBean, ejb-name=CloseEventsBean,
container=Default Singleton Container)
Jun 26, 2018 11:41:40 AM org.apache.openejb.assembler.classic.Assembler
startEjbs
INFO: Created Ejb(deployment-id=ManagerReminderBean,
ejb-name=ManagerReminderBean, container=Default Singleton Container)
Jun 26, 2018 11:41:40 AM sun.reflect.NativeMethodAccessorImpl invoke
SEVERE: Exception invoking periodic operation:
java.security.AccessControlException: access denied
("java.lang.RuntimePermission" "setContextClassLoader")
at
java.security.AccessControlContext.checkPermission(AccessControlContext.java:472)
at
java.security.AccessController.checkPermission(AccessController.java:884)
at
java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
at java.lang.Thread.setContextClassLoader(Thread.java:1474)
at
org.apache.openejb.log.LoggerCreator$Get.exec(LoggerCreator.java:94)
at
org.apache.openejb.log.LoggerCreator$Get.exec(LoggerCreator.java:105)
at
org.apache.openejb.util.JuliLogStream.isWarnEnabled(JuliLogStream.java:61)
at
org.apache.openejb.util.Logger.isWarningEnabled(Logger.java:425)
at org.apache.openejb.util.Logger.warning(Logger.java:646)
at
org.apache.tomee.catalina.TomcatWebAppBuilder.checkHost(TomcatWebAppBuilder.java:2233)
at
org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:141)
at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:94)
at
org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1164)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1388)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1392)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1360)
at java.lang.Thread.run(Thread.java:748)



Below is the repeating exception.

Jun 26, 2018 11:41:50 AM sun.reflect.NativeMethodAccessorImpl invoke
SEVERE: Exception invoking periodic operation:
java.security.AccessControlException: access denied
("java.io.FilePermission" "C:\IBM\liferay\tomee\webapps\ROOT.war" "read")
at
java.security.AccessControlContext.checkPermission(AccessControlContext.java:472)
at
java.security.AccessController.checkPermission(AccessController.java:884)
at
java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
at java.lang.SecurityManager.checkRead(SecurityManager.java:888)
at java.io.File.exists(File.java:814)
at
org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1296)
at
org.apache.catalina.startup.HostConfig.check(HostConfig.java:1623)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:314)
at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:94)
at
org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1164)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1388)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1392)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1360)
at java.lang.Thread.run(Thread.java:748)



What am I missing? I can see that the exception implies additional
permissions, but why doesn't my blanket grant of all permission in the
catalina policy file cover this?

Ross


Confidentiality Notice:
This electronic message and any attachments may contain confidential or
privileged information, and is intended only for the individual or entity
identified above as the addressee. If you are not the addressee (or the
employee or agent responsible to deliver it to the addressee), or if this
message has been addressed to you in error, you are hereby notified that
you may not copy, forward, disclose or use any part of this message or any
attachments. Please notify the sender immediately by return e-mail or
telephone and delete this message from your system.
Jonathan Gallimore
2018-06-27 16:22:43 UTC
Permalink
Hi

What version of TomEE are you running?

Are you deploying your EAR from webapps, or from apps with <Deployments
dir="apps" /> added in tomee.xml?

Regards

Jon
Post by r***@e1b.org
grant {
permission java.security.AllPermission;
};
I have set the work directory to "work" (and at deploy see the exploded
EAR there).
Also I have set deployOnStartup to false, autoDeploy to true, and
unpackWARs to true.
On deploy, at first matters look promising. It unpacks, initializes my
EJBs, then I get single AccessContorlException (RuntimePermistion),
followed by an infinitely repeating (every 5 seconds or so) access control
exception (FilePermission).
INFO: Created Ejb(deployment-id=CloseEventsBean,
ejb-name=CloseEventsBean,
container=Default Singleton Container)
Jun 26, 2018 11:41:40 AM org.apache.openejb.assembler.classic.Assembler
startEjbs
INFO: Created Ejb(deployment-id=ManagerReminderBean,
ejb-name=ManagerReminderBean, container=Default Singleton Container)
Jun 26, 2018 11:41:40 AM sun.reflect.NativeMethodAccessorImpl invoke
java.security.AccessControlException: access denied
("java.lang.RuntimePermission" "setContextClassLoader")
at
java.security.AccessControlContext.checkPermission(
AccessControlContext.java:472)
at
java.security.AccessController.checkPermission(AccessController.java:884)
at
java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
at java.lang.Thread.setContextClassLoader(Thread.java:1474)
at
org.apache.openejb.log.LoggerCreator$Get.exec(LoggerCreator.java:94)
at
org.apache.openejb.log.LoggerCreator$Get.exec(LoggerCreator.java:105)
at
org.apache.openejb.util.JuliLogStream.isWarnEnabled(JuliLogStream.java:61)
at
org.apache.openejb.util.Logger.isWarningEnabled(Logger.java:425)
at org.apache.openejb.util.Logger.warning(Logger.java:646)
at
org.apache.tomee.catalina.TomcatWebAppBuilder.checkHost(
TomcatWebAppBuilder.java:2233)
at
org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(
GlobalListenerSupport.java:141)
at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(
LifecycleBase.java:94)
at
org.apache.catalina.core.ContainerBase.backgroundProcess(
ContainerBase.java:1164)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.
processChildren(ContainerBase.java:1388)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.
processChildren(ContainerBase.java:1392)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.
run(ContainerBase.java:1360)
at java.lang.Thread.run(Thread.java:748)
Below is the repeating exception.
Jun 26, 2018 11:41:50 AM sun.reflect.NativeMethodAccessorImpl invoke
java.security.AccessControlException: access denied
("java.io.FilePermission" "C:\IBM\liferay\tomee\webapps\ROOT.war" "read")
at
java.security.AccessControlContext.checkPermission(
AccessControlContext.java:472)
at
java.security.AccessController.checkPermission(AccessController.java:884)
at
java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
at java.lang.SecurityManager.checkRead(SecurityManager.java:888)
at java.io.File.exists(File.java:814)
at
org.apache.catalina.startup.HostConfig.checkResources(
HostConfig.java:1296)
at
org.apache.catalina.startup.HostConfig.check(HostConfig.java:1623)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:314)
at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(
LifecycleBase.java:94)
at
org.apache.catalina.core.ContainerBase.backgroundProcess(
ContainerBase.java:1164)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.
processChildren(ContainerBase.java:1388)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.
processChildren(ContainerBase.java:1392)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.
run(ContainerBase.java:1360)
at java.lang.Thread.run(Thread.java:748)
What am I missing? I can see that the exception implies additional
permissions, but why doesn't my blanket grant of all permission in the
catalina policy file cover this?
Ross
This electronic message and any attachments may contain confidential or
privileged information, and is intended only for the individual or entity
identified above as the addressee. If you are not the addressee (or the
employee or agent responsible to deliver it to the addressee), or if this
message has been addressed to you in error, you are hereby notified that
you may not copy, forward, disclose or use any part of this message or any
attachments. Please notify the sender immediately by return e-mail or
telephone and delete this message from your system.
r***@e1b.org
2018-06-27 17:12:29 UTC
Permalink
I'm running 7.0.4. I have been deploying to webapps (<Deployments
dir="apps" /> remains commented).

Ross



From: "Jonathan Gallimore" <***@gmail.com>
To: ***@tomee.apache.org,
Date: 06/27/2018 12:22 PM
Subject: Re: EAR deployment



Hi

What version of TomEE are you running?

Are you deploying your EAR from webapps, or from apps with <Deployments
dir="apps" /> added in tomee.xml?

Regards

Jon
Post by r***@e1b.org
grant {
permission java.security.AllPermission;
};
I have set the work directory to "work" (and at deploy see the exploded
EAR there).
Also I have set deployOnStartup to false, autoDeploy to true, and
unpackWARs to true.
On deploy, at first matters look promising. It unpacks, initializes my
EJBs, then I get single AccessContorlException (RuntimePermistion),
followed by an infinitely repeating (every 5 seconds or so) access control
exception (FilePermission).
INFO: Created Ejb(deployment-id=CloseEventsBean,
ejb-name=CloseEventsBean,
container=Default Singleton Container)
Jun 26, 2018 11:41:40 AM org.apache.openejb.assembler.classic.Assembler
startEjbs
INFO: Created Ejb(deployment-id=ManagerReminderBean,
ejb-name=ManagerReminderBean, container=Default Singleton Container)
Jun 26, 2018 11:41:40 AM sun.reflect.NativeMethodAccessorImpl invoke
java.security.AccessControlException: access denied
("java.lang.RuntimePermission" "setContextClassLoader")
at
java.security.AccessControlContext.checkPermission(
AccessControlContext.java:472)
at
java.security.AccessController.checkPermission(AccessController.java:884)
Post by r***@e1b.org
at
java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
at java.lang.Thread.setContextClassLoader(Thread.java:1474)
at
org.apache.openejb.log.LoggerCreator$Get.exec(LoggerCreator.java:94)
at
org.apache.openejb.log.LoggerCreator$Get.exec(LoggerCreator.java:105)
at
org.apache.openejb.util.JuliLogStream.isWarnEnabled(JuliLogStream.java:61)
Post by r***@e1b.org
at
org.apache.openejb.util.Logger.isWarningEnabled(Logger.java:425)
at org.apache.openejb.util.Logger.warning(Logger.java:646)
at
org.apache.tomee.catalina.TomcatWebAppBuilder.checkHost(
TomcatWebAppBuilder.java:2233)
at
org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(
GlobalListenerSupport.java:141)
at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(
LifecycleBase.java:94)
at
org.apache.catalina.core.ContainerBase.backgroundProcess(
ContainerBase.java:1164)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.
processChildren(ContainerBase.java:1388)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.
processChildren(ContainerBase.java:1392)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.
run(ContainerBase.java:1360)
at java.lang.Thread.run(Thread.java:748)
Below is the repeating exception.
Jun 26, 2018 11:41:50 AM sun.reflect.NativeMethodAccessorImpl invoke
java.security.AccessControlException: access denied
("java.io.FilePermission" "C:\IBM\liferay\tomee\webapps\ROOT.war" "read")
at
java.security.AccessControlContext.checkPermission(
AccessControlContext.java:472)
at
java.security.AccessController.checkPermission(AccessController.java:884)
Post by r***@e1b.org
at
java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
at java.lang.SecurityManager.checkRead(SecurityManager.java:888)
at java.io.File.exists(File.java:814)
at
org.apache.catalina.startup.HostConfig.checkResources(
HostConfig.java:1296)
at
org.apache.catalina.startup.HostConfig.check(HostConfig.java:1623)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:314)
Post by r***@e1b.org
at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(
LifecycleBase.java:94)
at
org.apache.catalina.core.ContainerBase.backgroundProcess(
ContainerBase.java:1164)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.
processChildren(ContainerBase.java:1388)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.
processChildren(ContainerBase.java:1392)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.
run(ContainerBase.java:1360)
at java.lang.Thread.run(Thread.java:748)
What am I missing? I can see that the exception implies additional
permissions, but why doesn't my blanket grant of all permission in the
catalina policy file cover this?
Ross
This electronic message and any attachments may contain confidential or
privileged information, and is intended only for the individual or entity
identified above as the addressee. If you are not the addressee (or the
employee or agent responsible to deliver it to the addressee), or if this
message has been addressed to you in error, you are hereby notified that
you may not copy, forward, disclose or use any part of this message or any
attachments. Please notify the sender immediately by return e-mail or
telephone and delete this message from your system.
--
BEGIN-ANTISPAM-VOTING-LINKS
------------------------------------------------------

Teach CanIt if this mail (ID 01W3QmO1O) is spam:
Spam:
https://milton-web.wnyric.org/canit/b.php?c=s&i=01W3QmO1O&m=2bb7a21db8c9&t=20180627

Not spam:
https://milton-web.wnyric.org/canit/b.php?c=n&i=01W3QmO1O&m=2bb7a21db8c9&t=20180627

Forget vote:
https://milton-web.wnyric.org/canit/b.php?c=f&i=01W3QmO1O&m=2bb7a21db8c9&t=20180627

------------------------------------------------------
END-ANTISPAM-VOTING-LINKS





Confidentiality Notice:
This electronic message and any attachments may contain confidential or
privileged information, and is intended only for the individual or entity
identified above as the addressee. If you are not the addressee (or the
employee or agent responsible to deliver it to the addressee), or if this
message has been addressed to you in error, you are hereby notified that
you may not copy, forward, disclose or use any part of this message or any
attachments. Please notify the sender immediately by return e-mail or
telephone and delete this message from your system.
Romain Manni-Bucau
2018-06-27 20:54:33 UTC
Permalink
Hi

can you confirm it works without the security manager enabled?

Also can you check connecting on the JVM through JMX that the right policy
file is used and tomcat didn't override the one you thought using?

Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> | Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
<https://www.packtpub.com/application-development/java-ee-8-high-performance>
Post by r***@e1b.org
I'm running 7.0.4. I have been deploying to webapps (<Deployments
dir="apps" /> remains commented).
Ross
Date: 06/27/2018 12:22 PM
Subject: Re: EAR deployment
Hi
What version of TomEE are you running?
Are you deploying your EAR from webapps, or from apps with <Deployments
dir="apps" /> added in tomee.xml?
Regards
Jon
Post by r***@e1b.org
grant {
permission java.security.AllPermission;
};
I have set the work directory to "work" (and at deploy see the exploded
EAR there).
Also I have set deployOnStartup to false, autoDeploy to true, and
unpackWARs to true.
On deploy, at first matters look promising. It unpacks, initializes my
EJBs, then I get single AccessContorlException (RuntimePermistion),
followed by an infinitely repeating (every 5 seconds or so) access
control
Post by r***@e1b.org
exception (FilePermission).
INFO: Created Ejb(deployment-id=CloseEventsBean,
ejb-name=CloseEventsBean,
container=Default Singleton Container)
Jun 26, 2018 11:41:40 AM org.apache.openejb.assembler.classic.Assembler
startEjbs
INFO: Created Ejb(deployment-id=ManagerReminderBean,
ejb-name=ManagerReminderBean, container=Default Singleton Container)
Jun 26, 2018 11:41:40 AM sun.reflect.NativeMethodAccessorImpl invoke
java.security.AccessControlException: access denied
("java.lang.RuntimePermission" "setContextClassLoader")
at
java.security.AccessControlContext.checkPermission(
AccessControlContext.java:472)
at
java.security.AccessController.checkPermission(AccessController.java:884)
Post by r***@e1b.org
at
java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
at java.lang.Thread.setContextClassLoader(Thread.java:1474)
at
org.apache.openejb.log.LoggerCreator$Get.exec(LoggerCreator.java:94)
at
org.apache.openejb.log.LoggerCreator$Get.exec(LoggerCreator.java:105)
at
org.apache.openejb.util.JuliLogStream.isWarnEnabled(JuliLogStream.java:61)
Post by r***@e1b.org
at
org.apache.openejb.util.Logger.isWarningEnabled(Logger.java:425)
at org.apache.openejb.util.Logger.warning(Logger.java:646)
at
org.apache.tomee.catalina.TomcatWebAppBuilder.checkHost(
TomcatWebAppBuilder.java:2233)
at
org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(
GlobalListenerSupport.java:141)
at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(
LifecycleBase.java:94)
at
org.apache.catalina.core.ContainerBase.backgroundProcess(
ContainerBase.java:1164)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.
processChildren(ContainerBase.java:1388)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.
processChildren(ContainerBase.java:1392)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.
run(ContainerBase.java:1360)
at java.lang.Thread.run(Thread.java:748)
Below is the repeating exception.
Jun 26, 2018 11:41:50 AM sun.reflect.NativeMethodAccessorImpl invoke
java.security.AccessControlException: access denied
("java.io.FilePermission" "C:\IBM\liferay\tomee\webapps\ROOT.war"
"read")
Post by r***@e1b.org
at
java.security.AccessControlContext.checkPermission(
AccessControlContext.java:472)
at
java.security.AccessController.checkPermission(AccessController.java:884)
Post by r***@e1b.org
at
java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
at java.lang.SecurityManager.checkRead(SecurityManager.java:888)
at java.io.File.exists(File.java:814)
at
org.apache.catalina.startup.HostConfig.checkResources(
HostConfig.java:1296)
at
org.apache.catalina.startup.HostConfig.check(HostConfig.java:1623)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:314)
Post by r***@e1b.org
at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(
LifecycleBase.java:94)
at
org.apache.catalina.core.ContainerBase.backgroundProcess(
ContainerBase.java:1164)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.
processChildren(ContainerBase.java:1388)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.
processChildren(ContainerBase.java:1392)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.
run(ContainerBase.java:1360)
at java.lang.Thread.run(Thread.java:748)
What am I missing? I can see that the exception implies additional
permissions, but why doesn't my blanket grant of all permission in the
catalina policy file cover this?
Ross
This electronic message and any attachments may contain confidential or
privileged information, and is intended only for the individual or
entity
Post by r***@e1b.org
identified above as the addressee. If you are not the addressee (or the
employee or agent responsible to deliver it to the addressee), or if
this
Post by r***@e1b.org
message has been addressed to you in error, you are hereby notified that
you may not copy, forward, disclose or use any part of this message or
any
Post by r***@e1b.org
attachments. Please notify the sender immediately by return e-mail or
telephone and delete this message from your system.
--
BEGIN-ANTISPAM-VOTING-LINKS
------------------------------------------------------
https://milton-web.wnyric.org/canit/b.php?c=s&i=01W3QmO1O&m=2bb7a21db8c9&t=20180627
https://milton-web.wnyric.org/canit/b.php?c=n&i=01W3QmO1O&m=2bb7a21db8c9&t=20180627
https://milton-web.wnyric.org/canit/b.php?c=f&i=01W3QmO1O&m=2bb7a21db8c9&t=20180627
------------------------------------------------------
END-ANTISPAM-VOTING-LINKS
This electronic message and any attachments may contain confidential or
privileged information, and is intended only for the individual or entity
identified above as the addressee. If you are not the addressee (or the
employee or agent responsible to deliver it to the addressee), or if this
message has been addressed to you in error, you are hereby notified that
you may not copy, forward, disclose or use any part of this message or any
attachments. Please notify the sender immediately by return e-mail or
telephone and delete this message from your system.
r***@e1b.org
2018-06-28 15:19:06 UTC
Permalink
So:

1. With the security manager disabled, the ear deploys fine, ejb's
instantitiate, initialize, etc -- no errors at all!

2. I connected to the running jvm with jmx, and poked around for a while,
but could not find where it specified the policy file Tomcat was using.
Can I get a hint as to where this info is?

Thanks,
Ross



From: "Romain Manni-Bucau" <***@gmail.com>
To: ***@tomee.apache.org,
Date: 06/27/2018 04:54 PM
Subject: Re: EAR deployment



Hi

can you confirm it works without the security manager enabled?

Also can you check connecting on the JVM through JMX that the right policy
file is used and tomcat didn't override the one you thought using?

Romain Manni-Bucau
@rmannibucau <
https://milton-web.wnyric.org/canit/urlproxy.php?_q=aHR0cHM6Ly90d2l0dGVyLmNvbS9ybWFubmlidWNhdQ%3D%3D&_s=ZXJpZTE%3D&_c=7b6344b3
Post by Romain Manni-Bucau
| Blog
<
https://milton-web.wnyric.org/canit/urlproxy.php?_q=aHR0cHM6Ly9ybWFubmlidWNhdS5tZXRhd2VyeC5uZXQv&_s=ZXJpZTE%3D&_c=03b3f7d2
Post by Romain Manni-Bucau
| Old Blog
<
https://milton-web.wnyric.org/canit/urlproxy.php?_q=aHR0cDovL3JtYW5uaWJ1Y2F1LndvcmRwcmVzcy5jb20%3D&_s=ZXJpZTE%3D&_c=7ac52c4b
Post by Romain Manni-Bucau
| Github <
https://milton-web.wnyric.org/canit/urlproxy.php?_q=aHR0cHM6Ly9naXRodWIuY29tL3JtYW5uaWJ1Y2F1&_s=ZXJpZTE%3D&_c=d53ffcf9
Post by Romain Manni-Bucau
|
LinkedIn <
https://milton-web.wnyric.org/canit/urlproxy.php?_q=aHR0cHM6Ly93d3cubGlua2VkaW4uY29tL2luL3JtYW5uaWJ1Y2F1&_s=ZXJpZTE%3D&_c=aff046f7
Post by Romain Manni-Bucau
| Book
<
https://milton-web.wnyric.org/canit/urlproxy.php?_q=aHR0cHM6Ly93d3cucGFja3RwdWIuY29tL2FwcGxpY2F0aW9uLWRldmVsb3BtZW50L2phdmEtZWUtOC1oaWdoLXBlcmZvcm1hbmNl&_s=ZXJpZTE%3D&_c=5ede79c4
Post by Romain Manni-Bucau
I'm running 7.0.4. I have been deploying to webapps (<Deployments
dir="apps" /> remains commented).
Ross
Date: 06/27/2018 12:22 PM
Subject: Re: EAR deployment
Hi
What version of TomEE are you running?
Are you deploying your EAR from webapps, or from apps with <Deployments
dir="apps" /> added in tomee.xml?
Regards
Jon
Post by r***@e1b.org
grant {
permission java.security.AllPermission;
};
I have set the work directory to "work" (and at deploy see the exploded
EAR there).
Also I have set deployOnStartup to false, autoDeploy to true, and
unpackWARs to true.
On deploy, at first matters look promising. It unpacks, initializes my
EJBs, then I get single AccessContorlException (RuntimePermistion),
followed by an infinitely repeating (every 5 seconds or so) access
control
Post by r***@e1b.org
exception (FilePermission).
INFO: Created Ejb(deployment-id=CloseEventsBean,
ejb-name=CloseEventsBean,
container=Default Singleton Container)
Jun 26, 2018 11:41:40 AM
org.apache.openejb.assembler.classic.Assembler
Post by Romain Manni-Bucau
Post by r***@e1b.org
startEjbs
INFO: Created Ejb(deployment-id=ManagerReminderBean,
ejb-name=ManagerReminderBean, container=Default Singleton Container)
Jun 26, 2018 11:41:40 AM sun.reflect.NativeMethodAccessorImpl invoke
java.security.AccessControlException: access denied
("java.lang.RuntimePermission" "setContextClassLoader")
at
java.security.AccessControlContext.checkPermission(
AccessControlContext.java:472)
at
java.security.AccessController.checkPermission(AccessController.java:884)
Post by Romain Manni-Bucau
Post by r***@e1b.org
at
java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
at java.lang.Thread.setContextClassLoader(Thread.java:1474)
at
org.apache.openejb.log.LoggerCreator$Get.exec(LoggerCreator.java:94)
at
org.apache.openejb.log.LoggerCreator$Get.exec(LoggerCreator.java:105)
at
org.apache.openejb.util.JuliLogStream.isWarnEnabled(JuliLogStream.java:61)
Post by Romain Manni-Bucau
Post by r***@e1b.org
at
org.apache.openejb.util.Logger.isWarningEnabled(Logger.java:425)
at org.apache.openejb.util.Logger.warning(Logger.java:646)
at
org.apache.tomee.catalina.TomcatWebAppBuilder.checkHost(
TomcatWebAppBuilder.java:2233)
at
org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(
GlobalListenerSupport.java:141)
at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(
LifecycleBase.java:94)
at
org.apache.catalina.core.ContainerBase.backgroundProcess(
ContainerBase.java:1164)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.
processChildren(ContainerBase.java:1388)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.
processChildren(ContainerBase.java:1392)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.
run(ContainerBase.java:1360)
at java.lang.Thread.run(Thread.java:748)
Below is the repeating exception.
Jun 26, 2018 11:41:50 AM sun.reflect.NativeMethodAccessorImpl invoke
java.security.AccessControlException: access denied
("java.io.FilePermission" "C:\IBM\liferay\tomee\webapps\ROOT.war"
"read")
Post by r***@e1b.org
at
java.security.AccessControlContext.checkPermission(
AccessControlContext.java:472)
at
java.security.AccessController.checkPermission(AccessController.java:884)
Post by Romain Manni-Bucau
Post by r***@e1b.org
at
java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
at
java.lang.SecurityManager.checkRead(SecurityManager.java:888)
Post by Romain Manni-Bucau
Post by r***@e1b.org
at java.io.File.exists(File.java:814)
at
org.apache.catalina.startup.HostConfig.checkResources(
HostConfig.java:1296)
at
org.apache.catalina.startup.HostConfig.check(HostConfig.java:1623)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:314)
Post by Romain Manni-Bucau
Post by r***@e1b.org
at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(
LifecycleBase.java:94)
at
org.apache.catalina.core.ContainerBase.backgroundProcess(
ContainerBase.java:1164)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.
processChildren(ContainerBase.java:1388)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.
processChildren(ContainerBase.java:1392)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.
run(ContainerBase.java:1360)
at java.lang.Thread.run(Thread.java:748)
What am I missing? I can see that the exception implies additional
permissions, but why doesn't my blanket grant of all permission in the
catalina policy file cover this?
Ross
This electronic message and any attachments may contain confidential or
privileged information, and is intended only for the individual or
entity
Post by r***@e1b.org
identified above as the addressee. If you are not the addressee (or the
employee or agent responsible to deliver it to the addressee), or if
this
Post by r***@e1b.org
message has been addressed to you in error, you are hereby notified that
you may not copy, forward, disclose or use any part of this message or
any
Post by r***@e1b.org
attachments. Please notify the sender immediately by return e-mail or
telephone and delete this message from your system.
--
BEGIN-ANTISPAM-VOTING-LINKS
------------------------------------------------------
https://milton-web.wnyric.org/canit/b.php?c=s&i=01W3QmO1O&m=2bb7a21db8c9&t=20180627
https://milton-web.wnyric.org/canit/b.php?c=n&i=01W3QmO1O&m=2bb7a21db8c9&t=20180627
https://milton-web.wnyric.org/canit/b.php?c=f&i=01W3QmO1O&m=2bb7a21db8c9&t=20180627
Post by Romain Manni-Bucau
------------------------------------------------------
END-ANTISPAM-VOTING-LINKS
This electronic message and any attachments may contain confidential or
privileged information, and is intended only for the individual or entity
identified above as the addressee. If you are not the addressee (or the
employee or agent responsible to deliver it to the addressee), or if this
message has been addressed to you in error, you are hereby notified that
you may not copy, forward, disclose or use any part of this message or any
attachments. Please notify the sender immediately by return e-mail or
telephone and delete this message from your system.
--
BEGIN-ANTISPAM-VOTING-LINKS
------------------------------------------------------

Teach CanIt if this mail (ID 05W3USVJt) is spam:
Spam:
https://milton-web.wnyric.org/canit/b.php?c=s&i=05W3USVJt&m=03c723824a9b&t=20180627

Not spam:
https://milton-web.wnyric.org/canit/b.php?c=n&i=05W3USVJt&m=03c723824a9b&t=20180627

Forget vote:
https://milton-web.wnyric.org/canit/b.php?c=f&i=05W3USVJt&m=03c723824a9b&t=20180627

------------------------------------------------------
END-ANTISPAM-VOTING-LINKS





Confidentiality Notice:
This electronic message and any attachments may contain confidential or
privileged information, and is intended only for the individual or entity
identified above as the addressee. If you are not the addressee (or the
employee or agent responsible to deliver it to the addressee), or if this
message has been addressed to you in error, you are hereby notified that
you may not copy, forward, disclose or use any part of this message or any
attachments. Please notify the sender immediately by return e-mail or
telephone and delete this message from your system.
Romain Manni-Bucau
2018-06-28 15:20:15 UTC
Permalink
I think you can check it in the JVM info in system properties (VM Summary)

Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> | Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
<https://www.packtpub.com/application-development/java-ee-8-high-performance>
Post by r***@e1b.org
1. With the security manager disabled, the ear deploys fine, ejb's
instantitiate, initialize, etc -- no errors at all!
2. I connected to the running jvm with jmx, and poked around for a while,
but could not find where it specified the policy file Tomcat was using.
Can I get a hint as to where this info is?
Thanks,
Ross
Date: 06/27/2018 04:54 PM
Subject: Re: EAR deployment
Hi
can you confirm it works without the security manager enabled?
Also can you check connecting on the JVM through JMX that the right policy
file is used and tomcat didn't override the one you thought using?
Romain Manni-Bucau
@rmannibucau <
https://milton-web.wnyric.org/canit/urlproxy.php?_q=aHR0cHM6Ly90d2l0dGVyLmNvbS9ybWFubmlidWNhdQ%3D%3D&_s=ZXJpZTE%3D&_c=7b6344b3
Post by Romain Manni-Bucau
| Blog
<
https://milton-web.wnyric.org/canit/urlproxy.php?_q=aHR0cHM6Ly9ybWFubmlidWNhdS5tZXRhd2VyeC5uZXQv&_s=ZXJpZTE%3D&_c=03b3f7d2
Post by Romain Manni-Bucau
| Old Blog
<
https://milton-web.wnyric.org/canit/urlproxy.php?_q=aHR0cDovL3JtYW5uaWJ1Y2F1LndvcmRwcmVzcy5jb20%3D&_s=ZXJpZTE%3D&_c=7ac52c4b
Post by Romain Manni-Bucau
| Github <
https://milton-web.wnyric.org/canit/urlproxy.php?_q=aHR0cHM6Ly9naXRodWIuY29tL3JtYW5uaWJ1Y2F1&_s=ZXJpZTE%3D&_c=d53ffcf9
Post by Romain Manni-Bucau
|
LinkedIn <
https://milton-web.wnyric.org/canit/urlproxy.php?_q=aHR0cHM6Ly93d3cubGlua2VkaW4uY29tL2luL3JtYW5uaWJ1Y2F1&_s=ZXJpZTE%3D&_c=aff046f7
Post by Romain Manni-Bucau
| Book
<
https://milton-web.wnyric.org/canit/urlproxy.php?_q=aHR0cHM6Ly93d3cucGFja3RwdWIuY29tL2FwcGxpY2F0aW9uLWRldmVsb3BtZW50L2phdmEtZWUtOC1oaWdoLXBlcmZvcm1hbmNl&_s=ZXJpZTE%3D&_c=5ede79c4
Post by Romain Manni-Bucau
I'm running 7.0.4. I have been deploying to webapps (<Deployments
dir="apps" /> remains commented).
Ross
Date: 06/27/2018 12:22 PM
Subject: Re: EAR deployment
Hi
What version of TomEE are you running?
Are you deploying your EAR from webapps, or from apps with <Deployments
dir="apps" /> added in tomee.xml?
Regards
Jon
Post by r***@e1b.org
grant {
permission java.security.AllPermission;
};
I have set the work directory to "work" (and at deploy see the
exploded
Post by Romain Manni-Bucau
Post by r***@e1b.org
EAR there).
Also I have set deployOnStartup to false, autoDeploy to true, and
unpackWARs to true.
On deploy, at first matters look promising. It unpacks, initializes
my
Post by Romain Manni-Bucau
Post by r***@e1b.org
EJBs, then I get single AccessContorlException (RuntimePermistion),
followed by an infinitely repeating (every 5 seconds or so) access
control
Post by r***@e1b.org
exception (FilePermission).
INFO: Created Ejb(deployment-id=CloseEventsBean,
ejb-name=CloseEventsBean,
container=Default Singleton Container)
Jun 26, 2018 11:41:40 AM
org.apache.openejb.assembler.classic.Assembler
Post by Romain Manni-Bucau
Post by r***@e1b.org
startEjbs
INFO: Created Ejb(deployment-id=ManagerReminderBean,
ejb-name=ManagerReminderBean, container=Default Singleton Container)
Jun 26, 2018 11:41:40 AM sun.reflect.NativeMethodAccessorImpl invoke
java.security.AccessControlException: access denied
("java.lang.RuntimePermission" "setContextClassLoader")
at
java.security.AccessControlContext.checkPermission(
AccessControlContext.java:472)
at
java.security.AccessController.checkPermission(AccessController.java:884)
Post by Romain Manni-Bucau
Post by r***@e1b.org
at
java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
at java.lang.Thread.setContextClassLoader(Thread.java:1474)
at
org.apache.openejb.log.LoggerCreator$Get.exec(LoggerCreator.java:94)
at
org.apache.openejb.log.LoggerCreator$Get.exec(LoggerCreator.java:105)
at
org.apache.openejb.util.JuliLogStream.isWarnEnabled(JuliLogStream.java:61)
Post by Romain Manni-Bucau
Post by r***@e1b.org
at
org.apache.openejb.util.Logger.isWarningEnabled(Logger.java:425)
at org.apache.openejb.util.Logger.warning(Logger.java:646)
at
org.apache.tomee.catalina.TomcatWebAppBuilder.checkHost(
TomcatWebAppBuilder.java:2233)
at
org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(
GlobalListenerSupport.java:141)
at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(
LifecycleBase.java:94)
at
org.apache.catalina.core.ContainerBase.backgroundProcess(
ContainerBase.java:1164)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.
processChildren(ContainerBase.java:1388)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.
processChildren(ContainerBase.java:1392)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.
run(ContainerBase.java:1360)
at java.lang.Thread.run(Thread.java:748)
Below is the repeating exception.
Jun 26, 2018 11:41:50 AM sun.reflect.NativeMethodAccessorImpl invoke
java.security.AccessControlException: access denied
("java.io.FilePermission" "C:\IBM\liferay\tomee\webapps\ROOT.war"
"read")
Post by r***@e1b.org
at
java.security.AccessControlContext.checkPermission(
AccessControlContext.java:472)
at
java.security.AccessController.checkPermission(AccessController.java:884)
Post by Romain Manni-Bucau
Post by r***@e1b.org
at
java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
at
java.lang.SecurityManager.checkRead(SecurityManager.java:888)
Post by Romain Manni-Bucau
Post by r***@e1b.org
at java.io.File.exists(File.java:814)
at
org.apache.catalina.startup.HostConfig.checkResources(
HostConfig.java:1296)
at
org.apache.catalina.startup.HostConfig.check(HostConfig.java:1623)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:314)
Post by Romain Manni-Bucau
Post by r***@e1b.org
at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(
LifecycleBase.java:94)
at
org.apache.catalina.core.ContainerBase.backgroundProcess(
ContainerBase.java:1164)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.
processChildren(ContainerBase.java:1388)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.
processChildren(ContainerBase.java:1392)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.
run(ContainerBase.java:1360)
at java.lang.Thread.run(Thread.java:748)
What am I missing? I can see that the exception implies additional
permissions, but why doesn't my blanket grant of all permission in the
catalina policy file cover this?
Ross
This electronic message and any attachments may contain confidential
or
Post by Romain Manni-Bucau
Post by r***@e1b.org
privileged information, and is intended only for the individual or
entity
Post by r***@e1b.org
identified above as the addressee. If you are not the addressee (or
the
Post by Romain Manni-Bucau
Post by r***@e1b.org
employee or agent responsible to deliver it to the addressee), or if
this
Post by r***@e1b.org
message has been addressed to you in error, you are hereby notified
that
Post by Romain Manni-Bucau
Post by r***@e1b.org
you may not copy, forward, disclose or use any part of this message or
any
Post by r***@e1b.org
attachments. Please notify the sender immediately by return e-mail or
telephone and delete this message from your system.
--
BEGIN-ANTISPAM-VOTING-LINKS
------------------------------------------------------
https://milton-web.wnyric.org/canit/b.php?c=s&i=01W3QmO1O&m=2bb7a21db8c9&t=20180627
https://milton-web.wnyric.org/canit/b.php?c=n&i=01W3QmO1O&m=2bb7a21db8c9&t=20180627
https://milton-web.wnyric.org/canit/b.php?c=f&i=01W3QmO1O&m=2bb7a21db8c9&t=20180627
Post by Romain Manni-Bucau
------------------------------------------------------
END-ANTISPAM-VOTING-LINKS
This electronic message and any attachments may contain confidential or
privileged information, and is intended only for the individual or
entity
Post by Romain Manni-Bucau
identified above as the addressee. If you are not the addressee (or the
employee or agent responsible to deliver it to the addressee), or if
this
Post by Romain Manni-Bucau
message has been addressed to you in error, you are hereby notified that
you may not copy, forward, disclose or use any part of this message or
any
Post by Romain Manni-Bucau
attachments. Please notify the sender immediately by return e-mail or
telephone and delete this message from your system.
--
BEGIN-ANTISPAM-VOTING-LINKS
------------------------------------------------------
https://milton-web.wnyric.org/canit/b.php?c=s&i=05W3USVJt&m=03c723824a9b&t=20180627
https://milton-web.wnyric.org/canit/b.php?c=n&i=05W3USVJt&m=03c723824a9b&t=20180627
https://milton-web.wnyric.org/canit/b.php?c=f&i=05W3USVJt&m=03c723824a9b&t=20180627
------------------------------------------------------
END-ANTISPAM-VOTING-LINKS
This electronic message and any attachments may contain confidential or
privileged information, and is intended only for the individual or entity
identified above as the addressee. If you are not the addressee (or the
employee or agent responsible to deliver it to the addressee), or if this
message has been addressed to you in error, you are hereby notified that
you may not copy, forward, disclose or use any part of this message or any
attachments. Please notify the sender immediately by return e-mail or
telephone and delete this message from your system.
r***@e1b.org
2018-06-28 17:37:20 UTC
Permalink
Couldn't find it in the summary. Of course, its there as a VM argument,
but I expect that. After digging around a bit more I found it in the
MXBeans: java.lang -> Runtime -> Attributes.

Every thing there is set as it is in the file: ie
java.security.policy=C:\IBM\liferay\tomee\conf\catalina.policy
java.security.manager=<no value>

-- both of which I would expect.

Note that I have not tried chang <Deployments dir="apps" /> in tomee.xml.
Maybe that needs chaning -- though what I have seem really close to
working.

Just occurred to me that I never included my full VM args:

-Dcatalina.base="C:\IBM\liferay\tomee"
-Dcatalina.home="C:\IBM\liferay\tomee"
-Dwtp.deploy="C:\IBM\liferay\tomee\webapps"
-Djava.endorsed.dirs="C:\IBM\liferay\tomee\endorsed"
-Dfile.encoding=UTF8 -Djava.net.preferIPv4Stack=true
-Dorg.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES=false

-Duser.timezone=EST
-Djava.security.manager
-Djava.security.policy="C:\IBM\liferay\tomee\conf\catalina.policy"
-Djava.security.auth.login.config="C:\IBM\liferay\tomee\conf\jaas.config"
-Dwnyric.deployment.properties.directory.path="C:\IBM\liferay"
-Xmx2048m


Thanks,
Ross





From: "Romain Manni-Bucau" <***@gmail.com>
To: ***@tomee.apache.org,
Date: 06/28/2018 11:20 AM
Subject: Re: EAR deployment



I think you can check it in the JVM info in system properties (VM Summary)

Romain Manni-Bucau
@rmannibucau <
https://milton-web.wnyric.org/canit/urlproxy.php?_q=aHR0cHM6Ly90d2l0dGVyLmNvbS9ybWFubmlidWNhdQ%3D%3D&_s=ZXJpZTE%3D&_c=7b6344b3
Post by Romain Manni-Bucau
| Blog
<
https://milton-web.wnyric.org/canit/urlproxy.php?_q=aHR0cHM6Ly9ybWFubmlidWNhdS5tZXRhd2VyeC5uZXQv&_s=ZXJpZTE%3D&_c=03b3f7d2
Post by Romain Manni-Bucau
| Old Blog
<
https://milton-web.wnyric.org/canit/urlproxy.php?_q=aHR0cDovL3JtYW5uaWJ1Y2F1LndvcmRwcmVzcy5jb20%3D&_s=ZXJpZTE%3D&_c=7ac52c4b
Post by Romain Manni-Bucau
| Github <
https://milton-web.wnyric.org/canit/urlproxy.php?_q=aHR0cHM6Ly9naXRodWIuY29tL3JtYW5uaWJ1Y2F1&_s=ZXJpZTE%3D&_c=d53ffcf9
Post by Romain Manni-Bucau
|
LinkedIn <
https://milton-web.wnyric.org/canit/urlproxy.php?_q=aHR0cHM6Ly93d3cubGlua2VkaW4uY29tL2luL3JtYW5uaWJ1Y2F1&_s=ZXJpZTE%3D&_c=aff046f7
Post by Romain Manni-Bucau
| Book
<
https://milton-web.wnyric.org/canit/urlproxy.php?_q=aHR0cHM6Ly93d3cucGFja3RwdWIuY29tL2FwcGxpY2F0aW9uLWRldmVsb3BtZW50L2phdmEtZWUtOC1oaWdoLXBlcmZvcm1hbmNl&_s=ZXJpZTE%3D&_c=5ede79c4
Post by Romain Manni-Bucau
1. With the security manager disabled, the ear deploys fine, ejb's
instantitiate, initialize, etc -- no errors at all!
2. I connected to the running jvm with jmx, and poked around for a while,
but could not find where it specified the policy file Tomcat was using.
Can I get a hint as to where this info is?
Thanks,
Ross
Date: 06/27/2018 04:54 PM
Subject: Re: EAR deployment
Hi
can you confirm it works without the security manager enabled?
Also can you check connecting on the JVM through JMX that the right policy
file is used and tomcat didn't override the one you thought using?
Romain Manni-Bucau
@rmannibucau <
https://milton-web.wnyric.org/canit/urlproxy.php?_q=aHR0cHM6Ly90d2l0dGVyLmNvbS9ybWFubmlidWNhdQ%3D%3D&_s=ZXJpZTE%3D&_c=7b6344b3
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
| Blog
<
https://milton-web.wnyric.org/canit/urlproxy.php?_q=aHR0cHM6Ly9ybWFubmlidWNhdS5tZXRhd2VyeC5uZXQv&_s=ZXJpZTE%3D&_c=03b3f7d2
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
| Old Blog
<
https://milton-web.wnyric.org/canit/urlproxy.php?_q=aHR0cDovL3JtYW5uaWJ1Y2F1LndvcmRwcmVzcy5jb20%3D&_s=ZXJpZTE%3D&_c=7ac52c4b
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
| Github <
https://milton-web.wnyric.org/canit/urlproxy.php?_q=aHR0cHM6Ly9naXRodWIuY29tL3JtYW5uaWJ1Y2F1&_s=ZXJpZTE%3D&_c=d53ffcf9
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
|
LinkedIn <
https://milton-web.wnyric.org/canit/urlproxy.php?_q=aHR0cHM6Ly93d3cubGlua2VkaW4uY29tL2luL3JtYW5uaWJ1Y2F1&_s=ZXJpZTE%3D&_c=aff046f7
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
| Book
<
https://milton-web.wnyric.org/canit/urlproxy.php?_q=aHR0cHM6Ly93d3cucGFja3RwdWIuY29tL2FwcGxpY2F0aW9uLWRldmVsb3BtZW50L2phdmEtZWUtOC1oaWdoLXBlcmZvcm1hbmNl&_s=ZXJpZTE%3D&_c=5ede79c4
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
I'm running 7.0.4. I have been deploying to webapps (<Deployments
dir="apps" /> remains commented).
Ross
Date: 06/27/2018 12:22 PM
Subject: Re: EAR deployment
Hi
What version of TomEE are you running?
Are you deploying your EAR from webapps, or from apps with
<Deployments
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
dir="apps" /> added in tomee.xml?
Regards
Jon
Post by r***@e1b.org
grant {
permission java.security.AllPermission;
};
I have set the work directory to "work" (and at deploy see the
exploded
Post by Romain Manni-Bucau
Post by r***@e1b.org
EAR there).
Also I have set deployOnStartup to false, autoDeploy to true, and
unpackWARs to true.
On deploy, at first matters look promising. It unpacks,
initializes
Post by Romain Manni-Bucau
my
Post by Romain Manni-Bucau
Post by r***@e1b.org
EJBs, then I get single AccessContorlException (RuntimePermistion),
followed by an infinitely repeating (every 5 seconds or so) access
control
Post by r***@e1b.org
exception (FilePermission).
INFO: Created Ejb(deployment-id=CloseEventsBean,
ejb-name=CloseEventsBean,
container=Default Singleton Container)
Jun 26, 2018 11:41:40 AM
org.apache.openejb.assembler.classic.Assembler
Post by Romain Manni-Bucau
Post by r***@e1b.org
startEjbs
INFO: Created Ejb(deployment-id=ManagerReminderBean,
ejb-name=ManagerReminderBean, container=Default Singleton Container)
Jun 26, 2018 11:41:40 AM sun.reflect.NativeMethodAccessorImpl invoke
java.security.AccessControlException: access denied
("java.lang.RuntimePermission" "setContextClassLoader")
at
java.security.AccessControlContext.checkPermission(
AccessControlContext.java:472)
at
java.security.AccessController.checkPermission(AccessController.java:884)
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
Post by r***@e1b.org
at
java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
at java.lang.Thread.setContextClassLoader(Thread.java:1474)
at
org.apache.openejb.log.LoggerCreator$Get.exec(LoggerCreator.java:94)
at
org.apache.openejb.log.LoggerCreator$Get.exec(LoggerCreator.java:105)
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
Post by r***@e1b.org
at
org.apache.openejb.util.JuliLogStream.isWarnEnabled(JuliLogStream.java:61)
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
Post by r***@e1b.org
at
org.apache.openejb.util.Logger.isWarningEnabled(Logger.java:425)
at org.apache.openejb.util.Logger.warning(Logger.java:646)
at
org.apache.tomee.catalina.TomcatWebAppBuilder.checkHost(
TomcatWebAppBuilder.java:2233)
at
org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(
GlobalListenerSupport.java:141)
at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(
LifecycleBase.java:94)
at
org.apache.catalina.core.ContainerBase.backgroundProcess(
ContainerBase.java:1164)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.
processChildren(ContainerBase.java:1388)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.
processChildren(ContainerBase.java:1392)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.
run(ContainerBase.java:1360)
at java.lang.Thread.run(Thread.java:748)
Below is the repeating exception.
Jun 26, 2018 11:41:50 AM sun.reflect.NativeMethodAccessorImpl invoke
java.security.AccessControlException: access denied
("java.io.FilePermission" "C:\IBM\liferay\tomee\webapps\ROOT.war"
"read")
Post by r***@e1b.org
at
java.security.AccessControlContext.checkPermission(
AccessControlContext.java:472)
at
java.security.AccessController.checkPermission(AccessController.java:884)
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
Post by r***@e1b.org
at
java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
at
java.lang.SecurityManager.checkRead(SecurityManager.java:888)
Post by Romain Manni-Bucau
Post by r***@e1b.org
at java.io.File.exists(File.java:814)
at
org.apache.catalina.startup.HostConfig.checkResources(
HostConfig.java:1296)
at
org.apache.catalina.startup.HostConfig.check(HostConfig.java:1623)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:314)
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
Post by r***@e1b.org
at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(
LifecycleBase.java:94)
at
org.apache.catalina.core.ContainerBase.backgroundProcess(
ContainerBase.java:1164)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.
processChildren(ContainerBase.java:1388)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.
processChildren(ContainerBase.java:1392)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.
run(ContainerBase.java:1360)
at java.lang.Thread.run(Thread.java:748)
What am I missing? I can see that the exception implies additional
permissions, but why doesn't my blanket grant of all permission in the
catalina policy file cover this?
Ross
This electronic message and any attachments may contain confidential
or
Post by Romain Manni-Bucau
Post by r***@e1b.org
privileged information, and is intended only for the individual or
entity
Post by r***@e1b.org
identified above as the addressee. If you are not the addressee (or
the
Post by Romain Manni-Bucau
Post by r***@e1b.org
employee or agent responsible to deliver it to the addressee), or if
this
Post by r***@e1b.org
message has been addressed to you in error, you are hereby notified
that
Post by Romain Manni-Bucau
Post by r***@e1b.org
you may not copy, forward, disclose or use any part of this message or
any
Post by r***@e1b.org
attachments. Please notify the sender immediately by return e-mail or
telephone and delete this message from your system.
--
BEGIN-ANTISPAM-VOTING-LINKS
------------------------------------------------------
https://milton-web.wnyric.org/canit/b.php?c=s&i=01W3QmO1O&m=2bb7a21db8c9&t=20180627
https://milton-web.wnyric.org/canit/b.php?c=n&i=01W3QmO1O&m=2bb7a21db8c9&t=20180627
https://milton-web.wnyric.org/canit/b.php?c=f&i=01W3QmO1O&m=2bb7a21db8c9&t=20180627
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
------------------------------------------------------
END-ANTISPAM-VOTING-LINKS
This electronic message and any attachments may contain confidential or
privileged information, and is intended only for the individual or
entity
Post by Romain Manni-Bucau
identified above as the addressee. If you are not the addressee (or the
employee or agent responsible to deliver it to the addressee), or if
this
Post by Romain Manni-Bucau
message has been addressed to you in error, you are hereby notified that
you may not copy, forward, disclose or use any part of this message or
any
Post by Romain Manni-Bucau
attachments. Please notify the sender immediately by return e-mail or
telephone and delete this message from your system.
--
BEGIN-ANTISPAM-VOTING-LINKS
------------------------------------------------------
https://milton-web.wnyric.org/canit/b.php?c=s&i=05W3USVJt&m=03c723824a9b&t=20180627
https://milton-web.wnyric.org/canit/b.php?c=n&i=05W3USVJt&m=03c723824a9b&t=20180627
https://milton-web.wnyric.org/canit/b.php?c=f&i=05W3USVJt&m=03c723824a9b&t=20180627
Post by Romain Manni-Bucau
------------------------------------------------------
END-ANTISPAM-VOTING-LINKS
This electronic message and any attachments may contain confidential or
privileged information, and is intended only for the individual or entity
identified above as the addressee. If you are not the addressee (or the
employee or agent responsible to deliver it to the addressee), or if this
message has been addressed to you in error, you are hereby notified that
you may not copy, forward, disclose or use any part of this message or any
attachments. Please notify the sender immediately by return e-mail or
telephone and delete this message from your system.
--
BEGIN-ANTISPAM-VOTING-LINKS
------------------------------------------------------

Teach CanIt if this mail (ID 02W4fkxqC) is spam:
Spam:
https://milton-web.wnyric.org/canit/b.php?c=s&i=02W4fkxqC&m=d2fb064f979c&t=20180628

Not spam:
https://milton-web.wnyric.org/canit/b.php?c=n&i=02W4fkxqC&m=d2fb064f979c&t=20180628

Forget vote:
https://milton-web.wnyric.org/canit/b.php?c=f&i=02W4fkxqC&m=d2fb064f979c&t=20180628

------------------------------------------------------
END-ANTISPAM-VOTING-LINKS





Confidentiality Notice:
This electronic message and any attachments may contain confidential or
privileged information, and is intended only for the individual or entity
identified above as the addressee. If you are not the addressee (or the
employee or agent responsible to deliver it to the addressee), or if this
message has been addressed to you in error, you are hereby notified that
you may not copy, forward, disclose or use any part of this message or any
attachments. Please notify the sender immediately by return e-mail or
telephone and delete this message from your system.
Romain Manni-Bucau
2018-06-28 20:03:21 UTC
Permalink
I see

Then it is just a bug and we miss a wrapping to be SM compliant in that
part of the code.

Do you want to submit a PR to fix it?
Post by r***@e1b.org
Couldn't find it in the summary. Of course, its there as a VM argument,
but I expect that. After digging around a bit more I found it in the
MXBeans: java.lang -> Runtime -> Attributes.
Every thing there is set as it is in the file: ie
java.security.policy=C:\IBM\liferay\tomee\conf\catalina.policy
java.security.manager=<no value>
-- both of which I would expect.
Note that I have not tried chang <Deployments dir="apps" /> in tomee.xml.
Maybe that needs chaning -- though what I have seem really close to
working.
-Dcatalina.base="C:\IBM\liferay\tomee"
-Dcatalina.home="C:\IBM\liferay\tomee"
-Dwtp.deploy="C:\IBM\liferay\tomee\webapps"
-Djava.endorsed.dirs="C:\IBM\liferay\tomee\endorsed"
-Dfile.encoding=UTF8 -Djava.net.preferIPv4Stack=true
-Dorg.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES=false
-Duser.timezone=EST
-Djava.security.manager
-Djava.security.policy="C:\IBM\liferay\tomee\conf\catalina.policy"
-Djava.security.auth.login.config="C:\IBM\liferay\tomee\conf\jaas.config"
-Dwnyric.deployment.properties.directory.path="C:\IBM\liferay"
-Xmx2048m
Thanks,
Ross
Date: 06/28/2018 11:20 AM
Subject: Re: EAR deployment
I think you can check it in the JVM info in system properties (VM Summary)
Romain Manni-Bucau
@rmannibucau <
https://milton-web.wnyric.org/canit/urlproxy.php?_q=aHR0cHM6Ly90d2l0dGVyLmNvbS9ybWFubmlidWNhdQ%3D%3D&_s=ZXJpZTE%3D&_c=7b6344b3
Post by Romain Manni-Bucau
| Blog
<
https://milton-web.wnyric.org/canit/urlproxy.php?_q=aHR0cHM6Ly9ybWFubmlidWNhdS5tZXRhd2VyeC5uZXQv&_s=ZXJpZTE%3D&_c=03b3f7d2
Post by Romain Manni-Bucau
| Old Blog
<
https://milton-web.wnyric.org/canit/urlproxy.php?_q=aHR0cDovL3JtYW5uaWJ1Y2F1LndvcmRwcmVzcy5jb20%3D&_s=ZXJpZTE%3D&_c=7ac52c4b
Post by Romain Manni-Bucau
| Github <
https://milton-web.wnyric.org/canit/urlproxy.php?_q=aHR0cHM6Ly9naXRodWIuY29tL3JtYW5uaWJ1Y2F1&_s=ZXJpZTE%3D&_c=d53ffcf9
Post by Romain Manni-Bucau
|
LinkedIn <
https://milton-web.wnyric.org/canit/urlproxy.php?_q=aHR0cHM6Ly93d3cubGlua2VkaW4uY29tL2luL3JtYW5uaWJ1Y2F1&_s=ZXJpZTE%3D&_c=aff046f7
Post by Romain Manni-Bucau
| Book
<
https://milton-web.wnyric.org/canit/urlproxy.php?_q=aHR0cHM6Ly93d3cucGFja3RwdWIuY29tL2FwcGxpY2F0aW9uLWRldmVsb3BtZW50L2phdmEtZWUtOC1oaWdoLXBlcmZvcm1hbmNl&_s=ZXJpZTE%3D&_c=5ede79c4
Post by Romain Manni-Bucau
1. With the security manager disabled, the ear deploys fine, ejb's
instantitiate, initialize, etc -- no errors at all!
2. I connected to the running jvm with jmx, and poked around for a
while,
Post by Romain Manni-Bucau
but could not find where it specified the policy file Tomcat was using.
Can I get a hint as to where this info is?
Thanks,
Ross
Date: 06/27/2018 04:54 PM
Subject: Re: EAR deployment
Hi
can you confirm it works without the security manager enabled?
Also can you check connecting on the JVM through JMX that the right
policy
Post by Romain Manni-Bucau
file is used and tomcat didn't override the one you thought using?
Romain Manni-Bucau
@rmannibucau <
https://milton-web.wnyric.org/canit/urlproxy.php?_q=aHR0cHM6Ly90d2l0dGVyLmNvbS9ybWFubmlidWNhdQ%3D%3D&_s=ZXJpZTE%3D&_c=7b6344b3
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
| Blog
<
https://milton-web.wnyric.org/canit/urlproxy.php?_q=aHR0cHM6Ly9ybWFubmlidWNhdS5tZXRhd2VyeC5uZXQv&_s=ZXJpZTE%3D&_c=03b3f7d2
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
| Old Blog
<
https://milton-web.wnyric.org/canit/urlproxy.php?_q=aHR0cDovL3JtYW5uaWJ1Y2F1LndvcmRwcmVzcy5jb20%3D&_s=ZXJpZTE%3D&_c=7ac52c4b
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
| Github <
https://milton-web.wnyric.org/canit/urlproxy.php?_q=aHR0cHM6Ly9naXRodWIuY29tL3JtYW5uaWJ1Y2F1&_s=ZXJpZTE%3D&_c=d53ffcf9
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
|
LinkedIn <
https://milton-web.wnyric.org/canit/urlproxy.php?_q=aHR0cHM6Ly93d3cubGlua2VkaW4uY29tL2luL3JtYW5uaWJ1Y2F1&_s=ZXJpZTE%3D&_c=aff046f7
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
| Book
<
https://milton-web.wnyric.org/canit/urlproxy.php?_q=aHR0cHM6Ly93d3cucGFja3RwdWIuY29tL2FwcGxpY2F0aW9uLWRldmVsb3BtZW50L2phdmEtZWUtOC1oaWdoLXBlcmZvcm1hbmNl&_s=ZXJpZTE%3D&_c=5ede79c4
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
I'm running 7.0.4. I have been deploying to webapps (<Deployments
dir="apps" /> remains commented).
Ross
Date: 06/27/2018 12:22 PM
Subject: Re: EAR deployment
Hi
What version of TomEE are you running?
Are you deploying your EAR from webapps, or from apps with
<Deployments
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
dir="apps" /> added in tomee.xml?
Regards
Jon
Post by r***@e1b.org
grant {
permission java.security.AllPermission;
};
I have set the work directory to "work" (and at deploy see the
exploded
Post by Romain Manni-Bucau
Post by r***@e1b.org
EAR there).
Also I have set deployOnStartup to false, autoDeploy to true, and
unpackWARs to true.
On deploy, at first matters look promising. It unpacks,
initializes
Post by Romain Manni-Bucau
my
Post by Romain Manni-Bucau
Post by r***@e1b.org
EJBs, then I get single AccessContorlException (RuntimePermistion),
followed by an infinitely repeating (every 5 seconds or so) access
control
Post by r***@e1b.org
exception (FilePermission).
INFO: Created Ejb(deployment-id=CloseEventsBean,
ejb-name=CloseEventsBean,
container=Default Singleton Container)
Jun 26, 2018 11:41:40 AM
org.apache.openejb.assembler.classic.Assembler
Post by Romain Manni-Bucau
Post by r***@e1b.org
startEjbs
INFO: Created Ejb(deployment-id=ManagerReminderBean,
ejb-name=ManagerReminderBean, container=Default Singleton Container)
Jun 26, 2018 11:41:40 AM sun.reflect.NativeMethodAccessorImpl invoke
java.security.AccessControlException: access denied
("java.lang.RuntimePermission" "setContextClassLoader")
at
java.security.AccessControlContext.checkPermission(
AccessControlContext.java:472)
at
java.security.AccessController.checkPermission(AccessController.java:884)
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
Post by r***@e1b.org
at
java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
at java.lang.Thread.setContextClassLoader(Thread.java:1474)
at
org.apache.openejb.log.LoggerCreator$Get.exec(LoggerCreator.java:94)
at
org.apache.openejb.log.LoggerCreator$Get.exec(LoggerCreator.java:105)
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
Post by r***@e1b.org
at
org.apache.openejb.util.JuliLogStream.isWarnEnabled(JuliLogStream.java:61)
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
Post by r***@e1b.org
at
org.apache.openejb.util.Logger.isWarningEnabled(Logger.java:425)
at org.apache.openejb.util.Logger.warning(Logger.java:646)
at
org.apache.tomee.catalina.TomcatWebAppBuilder.checkHost(
TomcatWebAppBuilder.java:2233)
at
org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(
GlobalListenerSupport.java:141)
at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(
LifecycleBase.java:94)
at
org.apache.catalina.core.ContainerBase.backgroundProcess(
ContainerBase.java:1164)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.
processChildren(ContainerBase.java:1388)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.
processChildren(ContainerBase.java:1392)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.
run(ContainerBase.java:1360)
at java.lang.Thread.run(Thread.java:748)
Below is the repeating exception.
Jun 26, 2018 11:41:50 AM sun.reflect.NativeMethodAccessorImpl invoke
java.security.AccessControlException: access denied
("java.io.FilePermission" "C:\IBM\liferay\tomee\webapps\ROOT.war"
"read")
Post by r***@e1b.org
at
java.security.AccessControlContext.checkPermission(
AccessControlContext.java:472)
at
java.security.AccessController.checkPermission(AccessController.java:884)
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
Post by r***@e1b.org
at
java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
at
java.lang.SecurityManager.checkRead(SecurityManager.java:888)
Post by Romain Manni-Bucau
Post by r***@e1b.org
at java.io.File.exists(File.java:814)
at
org.apache.catalina.startup.HostConfig.checkResources(
HostConfig.java:1296)
at
org.apache.catalina.startup.HostConfig.check(HostConfig.java:1623)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:314)
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
Post by r***@e1b.org
at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(
LifecycleBase.java:94)
at
org.apache.catalina.core.ContainerBase.backgroundProcess(
ContainerBase.java:1164)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.
processChildren(ContainerBase.java:1388)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.
processChildren(ContainerBase.java:1392)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.
run(ContainerBase.java:1360)
at java.lang.Thread.run(Thread.java:748)
What am I missing? I can see that the exception implies additional
permissions, but why doesn't my blanket grant of all permission in
the
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
Post by r***@e1b.org
catalina policy file cover this?
Ross
This electronic message and any attachments may contain confidential
or
Post by Romain Manni-Bucau
Post by r***@e1b.org
privileged information, and is intended only for the individual or
entity
Post by r***@e1b.org
identified above as the addressee. If you are not the addressee (or
the
Post by Romain Manni-Bucau
Post by r***@e1b.org
employee or agent responsible to deliver it to the addressee), or if
this
Post by r***@e1b.org
message has been addressed to you in error, you are hereby notified
that
Post by Romain Manni-Bucau
Post by r***@e1b.org
you may not copy, forward, disclose or use any part of this message
or
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
any
Post by r***@e1b.org
attachments. Please notify the sender immediately by return e-mail
or
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
Post by r***@e1b.org
telephone and delete this message from your system.
--
BEGIN-ANTISPAM-VOTING-LINKS
------------------------------------------------------
https://milton-web.wnyric.org/canit/b.php?c=s&i=01W3QmO1O&m=2bb7a21db8c9&t=20180627
https://milton-web.wnyric.org/canit/b.php?c=n&i=01W3QmO1O&m=2bb7a21db8c9&t=20180627
https://milton-web.wnyric.org/canit/b.php?c=f&i=01W3QmO1O&m=2bb7a21db8c9&t=20180627
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
------------------------------------------------------
END-ANTISPAM-VOTING-LINKS
This electronic message and any attachments may contain confidential
or
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
privileged information, and is intended only for the individual or
entity
Post by Romain Manni-Bucau
identified above as the addressee. If you are not the addressee (or
the
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
employee or agent responsible to deliver it to the addressee), or if
this
Post by Romain Manni-Bucau
message has been addressed to you in error, you are hereby notified
that
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
you may not copy, forward, disclose or use any part of this message or
any
Post by Romain Manni-Bucau
attachments. Please notify the sender immediately by return e-mail or
telephone and delete this message from your system.
--
BEGIN-ANTISPAM-VOTING-LINKS
------------------------------------------------------
https://milton-web.wnyric.org/canit/b.php?c=s&i=05W3USVJt&m=03c723824a9b&t=20180627
https://milton-web.wnyric.org/canit/b.php?c=n&i=05W3USVJt&m=03c723824a9b&t=20180627
https://milton-web.wnyric.org/canit/b.php?c=f&i=05W3USVJt&m=03c723824a9b&t=20180627
Post by Romain Manni-Bucau
------------------------------------------------------
END-ANTISPAM-VOTING-LINKS
This electronic message and any attachments may contain confidential or
privileged information, and is intended only for the individual or
entity
Post by Romain Manni-Bucau
identified above as the addressee. If you are not the addressee (or the
employee or agent responsible to deliver it to the addressee), or if
this
Post by Romain Manni-Bucau
message has been addressed to you in error, you are hereby notified that
you may not copy, forward, disclose or use any part of this message or
any
Post by Romain Manni-Bucau
attachments. Please notify the sender immediately by return e-mail or
telephone and delete this message from your system.
--
BEGIN-ANTISPAM-VOTING-LINKS
------------------------------------------------------
https://milton-web.wnyric.org/canit/b.php?c=s&i=02W4fkxqC&m=d2fb064f979c&t=20180628
https://milton-web.wnyric.org/canit/b.php?c=n&i=02W4fkxqC&m=d2fb064f979c&t=20180628
https://milton-web.wnyric.org/canit/b.php?c=f&i=02W4fkxqC&m=d2fb064f979c&t=20180628
------------------------------------------------------
END-ANTISPAM-VOTING-LINKS
This electronic message and any attachments may contain confidential or
privileged information, and is intended only for the individual or entity
identified above as the addressee. If you are not the addressee (or the
employee or agent responsible to deliver it to the addressee), or if this
message has been addressed to you in error, you are hereby notified that
you may not copy, forward, disclose or use any part of this message or any
attachments. Please notify the sender immediately by return e-mail or
telephone and delete this message from your system.
r***@e1b.org
2018-06-29 14:44:06 UTC
Permalink
Not terribly familiar with Git, but I assume you asking me to submit a
pull request that points to a fix? The short answer is "no". I would
love to see this fixed, but right now I don't have the time to grok git
(we use svn), set up a build environment for Tomee, pickup maven (we use
ant+ivy), and figure out the actual bug. If I have to, I will --- but
only God knows how long it will be before I can make the time to do these
things.

But this raises a question: am I really the last person still deploying
EARs?! Really???

Thanks for your prompt help -- you guys are amazing!
Ross





From: "Romain Manni-Bucau" <***@gmail.com>
To: ***@tomee.apache.org,
Date: 06/28/2018 04:03 PM
Subject: Re: EAR deployment



I see

Then it is just a bug and we miss a wrapping to be SM compliant in that
part of the code.

Do you want to submit a PR to fix it?
Post by r***@e1b.org
Couldn't find it in the summary. Of course, its there as a VM argument,
but I expect that. After digging around a bit more I found it in the
MXBeans: java.lang -> Runtime -> Attributes.
Every thing there is set as it is in the file: ie
java.security.policy=C:\IBM\liferay\tomee\conf\catalina.policy
java.security.manager=<no value>
-- both of which I would expect.
Note that I have not tried chang <Deployments dir="apps" /> in
tomee.xml.
Post by r***@e1b.org
Maybe that needs chaning -- though what I have seem really close to
working.
-Dcatalina.base="C:\IBM\liferay\tomee"
-Dcatalina.home="C:\IBM\liferay\tomee"
-Dwtp.deploy="C:\IBM\liferay\tomee\webapps"
-Djava.endorsed.dirs="C:\IBM\liferay\tomee\endorsed"
-Dfile.encoding=UTF8 -Djava.net.preferIPv4Stack=true
-Dorg.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES=false
Post by r***@e1b.org
-Duser.timezone=EST
-Djava.security.manager
-Djava.security.policy="C:\IBM\liferay\tomee\conf\catalina.policy"
-Djava.security.auth.login.config="C:\IBM\liferay\tomee\conf\jaas.config"
Post by r***@e1b.org
-Dwnyric.deployment.properties.directory.path="C:\IBM\liferay"
-Xmx2048m
Thanks,
Ross
Date: 06/28/2018 11:20 AM
Subject: Re: EAR deployment
I think you can check it in the JVM info in system properties (VM Summary)
Romain Manni-Bucau
@rmannibucau <
https://milton-web.wnyric.org/canit/urlproxy.php?_q=aHR0cHM6Ly90d2l0dGVyLmNvbS9ybWFubmlidWNhdQ%3D%3D&_s=ZXJpZTE%3D&_c=7b6344b3
Post by r***@e1b.org
Post by Romain Manni-Bucau
| Blog
<
https://milton-web.wnyric.org/canit/urlproxy.php?_q=aHR0cHM6Ly9ybWFubmlidWNhdS5tZXRhd2VyeC5uZXQv&_s=ZXJpZTE%3D&_c=03b3f7d2
Post by r***@e1b.org
Post by Romain Manni-Bucau
| Old Blog
<
https://milton-web.wnyric.org/canit/urlproxy.php?_q=aHR0cDovL3JtYW5uaWJ1Y2F1LndvcmRwcmVzcy5jb20%3D&_s=ZXJpZTE%3D&_c=7ac52c4b
Post by r***@e1b.org
Post by Romain Manni-Bucau
| Github <
https://milton-web.wnyric.org/canit/urlproxy.php?_q=aHR0cHM6Ly9naXRodWIuY29tL3JtYW5uaWJ1Y2F1&_s=ZXJpZTE%3D&_c=d53ffcf9
Post by r***@e1b.org
Post by Romain Manni-Bucau
|
LinkedIn <
https://milton-web.wnyric.org/canit/urlproxy.php?_q=aHR0cHM6Ly93d3cubGlua2VkaW4uY29tL2luL3JtYW5uaWJ1Y2F1&_s=ZXJpZTE%3D&_c=aff046f7
Post by r***@e1b.org
Post by Romain Manni-Bucau
| Book
<
https://milton-web.wnyric.org/canit/urlproxy.php?_q=aHR0cHM6Ly93d3cucGFja3RwdWIuY29tL2FwcGxpY2F0aW9uLWRldmVsb3BtZW50L2phdmEtZWUtOC1oaWdoLXBlcmZvcm1hbmNl&_s=ZXJpZTE%3D&_c=5ede79c4
Post by r***@e1b.org
Post by Romain Manni-Bucau
1. With the security manager disabled, the ear deploys fine, ejb's
instantitiate, initialize, etc -- no errors at all!
2. I connected to the running jvm with jmx, and poked around for a
while,
Post by Romain Manni-Bucau
but could not find where it specified the policy file Tomcat was using.
Can I get a hint as to where this info is?
Thanks,
Ross
Date: 06/27/2018 04:54 PM
Subject: Re: EAR deployment
Hi
can you confirm it works without the security manager enabled?
Also can you check connecting on the JVM through JMX that the right
policy
Post by Romain Manni-Bucau
file is used and tomcat didn't override the one you thought using?
Romain Manni-Bucau
@rmannibucau <
https://milton-web.wnyric.org/canit/urlproxy.php?_q=aHR0cHM6Ly90d2l0dGVyLmNvbS9ybWFubmlidWNhdQ%3D%3D&_s=ZXJpZTE%3D&_c=7b6344b3
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
| Blog
<
https://milton-web.wnyric.org/canit/urlproxy.php?_q=aHR0cHM6Ly9ybWFubmlidWNhdS5tZXRhd2VyeC5uZXQv&_s=ZXJpZTE%3D&_c=03b3f7d2
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
| Old Blog
<
https://milton-web.wnyric.org/canit/urlproxy.php?_q=aHR0cDovL3JtYW5uaWJ1Y2F1LndvcmRwcmVzcy5jb20%3D&_s=ZXJpZTE%3D&_c=7ac52c4b
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
| Github <
https://milton-web.wnyric.org/canit/urlproxy.php?_q=aHR0cHM6Ly9naXRodWIuY29tL3JtYW5uaWJ1Y2F1&_s=ZXJpZTE%3D&_c=d53ffcf9
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
|
LinkedIn <
https://milton-web.wnyric.org/canit/urlproxy.php?_q=aHR0cHM6Ly93d3cubGlua2VkaW4uY29tL2luL3JtYW5uaWJ1Y2F1&_s=ZXJpZTE%3D&_c=aff046f7
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
| Book
<
https://milton-web.wnyric.org/canit/urlproxy.php?_q=aHR0cHM6Ly93d3cucGFja3RwdWIuY29tL2FwcGxpY2F0aW9uLWRldmVsb3BtZW50L2phdmEtZWUtOC1oaWdoLXBlcmZvcm1hbmNl&_s=ZXJpZTE%3D&_c=5ede79c4
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
I'm running 7.0.4. I have been deploying to webapps (<Deployments
dir="apps" /> remains commented).
Ross
Date: 06/27/2018 12:22 PM
Subject: Re: EAR deployment
Hi
What version of TomEE are you running?
Are you deploying your EAR from webapps, or from apps with
<Deployments
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
dir="apps" /> added in tomee.xml?
Regards
Jon
Post by r***@e1b.org
grant {
permission java.security.AllPermission;
};
I have set the work directory to "work" (and at deploy see the
exploded
Post by Romain Manni-Bucau
Post by r***@e1b.org
EAR there).
Also I have set deployOnStartup to false, autoDeploy to true, and
unpackWARs to true.
On deploy, at first matters look promising. It unpacks,
initializes
Post by Romain Manni-Bucau
my
Post by Romain Manni-Bucau
Post by r***@e1b.org
EJBs, then I get single AccessContorlException
(RuntimePermistion),
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
Post by r***@e1b.org
followed by an infinitely repeating (every 5 seconds or so) access
control
Post by r***@e1b.org
exception (FilePermission).
INFO: Created Ejb(deployment-id=CloseEventsBean,
ejb-name=CloseEventsBean,
container=Default Singleton Container)
Jun 26, 2018 11:41:40 AM
org.apache.openejb.assembler.classic.Assembler
Post by Romain Manni-Bucau
Post by r***@e1b.org
startEjbs
INFO: Created Ejb(deployment-id=ManagerReminderBean,
ejb-name=ManagerReminderBean, container=Default Singleton Container)
Jun 26, 2018 11:41:40 AM sun.reflect.NativeMethodAccessorImpl invoke
java.security.AccessControlException: access denied
("java.lang.RuntimePermission" "setContextClassLoader")
at
java.security.AccessControlContext.checkPermission(
AccessControlContext.java:472)
at
java.security.AccessController.checkPermission(AccessController.java:884)
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
Post by r***@e1b.org
at
java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
Post by r***@e1b.org
at
java.lang.Thread.setContextClassLoader(Thread.java:1474)
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
Post by r***@e1b.org
at
org.apache.openejb.log.LoggerCreator$Get.exec(LoggerCreator.java:94)
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
Post by r***@e1b.org
at
org.apache.openejb.log.LoggerCreator$Get.exec(LoggerCreator.java:105)
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
Post by r***@e1b.org
at
org.apache.openejb.util.JuliLogStream.isWarnEnabled(JuliLogStream.java:61)
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
Post by r***@e1b.org
at
org.apache.openejb.util.Logger.isWarningEnabled(Logger.java:425)
at org.apache.openejb.util.Logger.warning(Logger.java:646)
at
org.apache.tomee.catalina.TomcatWebAppBuilder.checkHost(
TomcatWebAppBuilder.java:2233)
at
org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(
GlobalListenerSupport.java:141)
at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(
LifecycleBase.java:94)
at
org.apache.catalina.core.ContainerBase.backgroundProcess(
ContainerBase.java:1164)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
Post by r***@e1b.org
processChildren(ContainerBase.java:1388)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
Post by r***@e1b.org
processChildren(ContainerBase.java:1392)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
Post by r***@e1b.org
run(ContainerBase.java:1360)
at java.lang.Thread.run(Thread.java:748)
Below is the repeating exception.
Jun 26, 2018 11:41:50 AM sun.reflect.NativeMethodAccessorImpl invoke
java.security.AccessControlException: access denied
("java.io.FilePermission" "C:\IBM\liferay\tomee\webapps\ROOT.war"
"read")
Post by r***@e1b.org
at
java.security.AccessControlContext.checkPermission(
AccessControlContext.java:472)
at
java.security.AccessController.checkPermission(AccessController.java:884)
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
Post by r***@e1b.org
at
java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
Post by r***@e1b.org
at
java.lang.SecurityManager.checkRead(SecurityManager.java:888)
Post by Romain Manni-Bucau
Post by r***@e1b.org
at java.io.File.exists(File.java:814)
at
org.apache.catalina.startup.HostConfig.checkResources(
HostConfig.java:1296)
at
org.apache.catalina.startup.HostConfig.check(HostConfig.java:1623)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:314)
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
Post by r***@e1b.org
at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(
LifecycleBase.java:94)
at
org.apache.catalina.core.ContainerBase.backgroundProcess(
ContainerBase.java:1164)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
Post by r***@e1b.org
processChildren(ContainerBase.java:1388)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
Post by r***@e1b.org
processChildren(ContainerBase.java:1392)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
Post by r***@e1b.org
run(ContainerBase.java:1360)
at java.lang.Thread.run(Thread.java:748)
What am I missing? I can see that the exception implies additional
permissions, but why doesn't my blanket grant of all permission in
the
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
Post by r***@e1b.org
catalina policy file cover this?
Ross
This electronic message and any attachments may contain
confidential
Post by r***@e1b.org
Post by Romain Manni-Bucau
or
Post by Romain Manni-Bucau
Post by r***@e1b.org
privileged information, and is intended only for the individual or
entity
Post by r***@e1b.org
identified above as the addressee. If you are not the addressee (or
the
Post by Romain Manni-Bucau
Post by r***@e1b.org
employee or agent responsible to deliver it to the addressee), or if
this
Post by r***@e1b.org
message has been addressed to you in error, you are hereby notified
that
Post by Romain Manni-Bucau
Post by r***@e1b.org
you may not copy, forward, disclose or use any part of this message
or
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
any
Post by r***@e1b.org
attachments. Please notify the sender immediately by return e-mail
or
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
Post by r***@e1b.org
telephone and delete this message from your system.
--
BEGIN-ANTISPAM-VOTING-LINKS
------------------------------------------------------
https://milton-web.wnyric.org/canit/b.php?c=s&i=01W3QmO1O&m=2bb7a21db8c9&t=20180627
https://milton-web.wnyric.org/canit/b.php?c=n&i=01W3QmO1O&m=2bb7a21db8c9&t=20180627
https://milton-web.wnyric.org/canit/b.php?c=f&i=01W3QmO1O&m=2bb7a21db8c9&t=20180627
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
------------------------------------------------------
END-ANTISPAM-VOTING-LINKS
This electronic message and any attachments may contain confidential
or
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
privileged information, and is intended only for the individual or
entity
Post by Romain Manni-Bucau
identified above as the addressee. If you are not the addressee (or
the
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
employee or agent responsible to deliver it to the addressee), or if
this
Post by Romain Manni-Bucau
message has been addressed to you in error, you are hereby notified
that
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
you may not copy, forward, disclose or use any part of this message or
any
Post by Romain Manni-Bucau
attachments. Please notify the sender immediately by return e-mail or
telephone and delete this message from your system.
--
BEGIN-ANTISPAM-VOTING-LINKS
------------------------------------------------------
https://milton-web.wnyric.org/canit/b.php?c=s&i=05W3USVJt&m=03c723824a9b&t=20180627
https://milton-web.wnyric.org/canit/b.php?c=n&i=05W3USVJt&m=03c723824a9b&t=20180627
https://milton-web.wnyric.org/canit/b.php?c=f&i=05W3USVJt&m=03c723824a9b&t=20180627
Post by r***@e1b.org
Post by Romain Manni-Bucau
------------------------------------------------------
END-ANTISPAM-VOTING-LINKS
This electronic message and any attachments may contain confidential or
privileged information, and is intended only for the individual or
entity
Post by Romain Manni-Bucau
identified above as the addressee. If you are not the addressee (or the
employee or agent responsible to deliver it to the addressee), or if
this
Post by Romain Manni-Bucau
message has been addressed to you in error, you are hereby notified that
you may not copy, forward, disclose or use any part of this message or
any
Post by Romain Manni-Bucau
attachments. Please notify the sender immediately by return e-mail or
telephone and delete this message from your system.
--
BEGIN-ANTISPAM-VOTING-LINKS
------------------------------------------------------
https://milton-web.wnyric.org/canit/b.php?c=s&i=02W4fkxqC&m=d2fb064f979c&t=20180628
https://milton-web.wnyric.org/canit/b.php?c=n&i=02W4fkxqC&m=d2fb064f979c&t=20180628
https://milton-web.wnyric.org/canit/b.php?c=f&i=02W4fkxqC&m=d2fb064f979c&t=20180628
Post by r***@e1b.org
------------------------------------------------------
END-ANTISPAM-VOTING-LINKS
This electronic message and any attachments may contain confidential or
privileged information, and is intended only for the individual or entity
identified above as the addressee. If you are not the addressee (or the
employee or agent responsible to deliver it to the addressee), or if this
message has been addressed to you in error, you are hereby notified that
you may not copy, forward, disclose or use any part of this message or any
attachments. Please notify the sender immediately by return e-mail or
telephone and delete this message from your system.
--
BEGIN-ANTISPAM-VOTING-LINKS
------------------------------------------------------

Teach CanIt if this mail (ID 05W4k3PHx) is spam:
Spam:
https://milton-web.wnyric.org/canit/b.php?c=s&i=05W4k3PHx&m=4665151ab5c3&t=20180628

Not spam:
https://milton-web.wnyric.org/canit/b.php?c=n&i=05W4k3PHx&m=4665151ab5c3&t=20180628

Forget vote:
https://milton-web.wnyric.org/canit/b.php?c=f&i=05W4k3PHx&m=4665151ab5c3&t=20180628

------------------------------------------------------
END-ANTISPAM-VOTING-LINKS





Confidentiality Notice:
This electronic message and any attachments may contain confidential or
privileged information, and is intended only for the individual or entity
identified above as the addressee. If you are not the addressee (or the
employee or agent responsible to deliver it to the addressee), or if this
message has been addressed to you in error, you are hereby notified that
you may not copy, forward, disclose or use any part of this message or any
attachments. Please notify the sender immediately by return e-mail or
telephone and delete this message from your system.
Romain Manni-Bucau
2018-06-29 14:50:49 UTC
Permalink
ears probably not (but you are not that numerous anymore ;)) but with a
security manager is more the criteria here IMHO.

Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> | Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
<https://www.packtpub.com/application-development/java-ee-8-high-performance>
Post by r***@e1b.org
Not terribly familiar with Git, but I assume you asking me to submit a
pull request that points to a fix? The short answer is "no". I would
love to see this fixed, but right now I don't have the time to grok git
(we use svn), set up a build environment for Tomee, pickup maven (we use
ant+ivy), and figure out the actual bug. If I have to, I will --- but
only God knows how long it will be before I can make the time to do these
things.
But this raises a question: am I really the last person still deploying
EARs?! Really???
Thanks for your prompt help -- you guys are amazing!
Ross
Date: 06/28/2018 04:03 PM
Subject: Re: EAR deployment
I see
Then it is just a bug and we miss a wrapping to be SM compliant in that
part of the code.
Do you want to submit a PR to fix it?
Post by r***@e1b.org
Couldn't find it in the summary. Of course, its there as a VM
argument,
Post by r***@e1b.org
but I expect that. After digging around a bit more I found it in the
MXBeans: java.lang -> Runtime -> Attributes.
Every thing there is set as it is in the file: ie
java.security.policy=C:\IBM\liferay\tomee\conf\catalina.policy
java.security.manager=<no value>
-- both of which I would expect.
Note that I have not tried chang <Deployments dir="apps" /> in
tomee.xml.
Post by r***@e1b.org
Maybe that needs chaning -- though what I have seem really close to
working.
-Dcatalina.base="C:\IBM\liferay\tomee"
-Dcatalina.home="C:\IBM\liferay\tomee"
-Dwtp.deploy="C:\IBM\liferay\tomee\webapps"
-Djava.endorsed.dirs="C:\IBM\liferay\tomee\endorsed"
-Dfile.encoding=UTF8 -Djava.net.preferIPv4Stack=true
-Dorg.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES=false
Post by r***@e1b.org
-Duser.timezone=EST
-Djava.security.manager
-Djava.security.policy="C:\IBM\liferay\tomee\conf\catalina.policy"
-Djava.security.auth.login.config="C:\IBM\liferay\tomee\conf\jaas.config"
Post by r***@e1b.org
-Dwnyric.deployment.properties.directory.path="C:\IBM\liferay"
-Xmx2048m
Thanks,
Ross
Date: 06/28/2018 11:20 AM
Subject: Re: EAR deployment
I think you can check it in the JVM info in system properties (VM
Summary)
Post by r***@e1b.org
Romain Manni-Bucau
@rmannibucau <
https://milton-web.wnyric.org/canit/urlproxy.php?_q=aHR0cHM6Ly90d2l0dGVyLmNvbS9ybWFubmlidWNhdQ%3D%3D&_s=ZXJpZTE%3D&_c=7b6344b3
Post by r***@e1b.org
Post by Romain Manni-Bucau
| Blog
<
https://milton-web.wnyric.org/canit/urlproxy.php?_q=aHR0cHM6Ly9ybWFubmlidWNhdS5tZXRhd2VyeC5uZXQv&_s=ZXJpZTE%3D&_c=03b3f7d2
Post by r***@e1b.org
Post by Romain Manni-Bucau
| Old Blog
<
https://milton-web.wnyric.org/canit/urlproxy.php?_q=aHR0cDovL3JtYW5uaWJ1Y2F1LndvcmRwcmVzcy5jb20%3D&_s=ZXJpZTE%3D&_c=7ac52c4b
Post by r***@e1b.org
Post by Romain Manni-Bucau
| Github <
https://milton-web.wnyric.org/canit/urlproxy.php?_q=aHR0cHM6Ly9naXRodWIuY29tL3JtYW5uaWJ1Y2F1&_s=ZXJpZTE%3D&_c=d53ffcf9
Post by r***@e1b.org
Post by Romain Manni-Bucau
|
LinkedIn <
https://milton-web.wnyric.org/canit/urlproxy.php?_q=aHR0cHM6Ly93d3cubGlua2VkaW4uY29tL2luL3JtYW5uaWJ1Y2F1&_s=ZXJpZTE%3D&_c=aff046f7
Post by r***@e1b.org
Post by Romain Manni-Bucau
| Book
<
https://milton-web.wnyric.org/canit/urlproxy.php?_q=aHR0cHM6Ly93d3cucGFja3RwdWIuY29tL2FwcGxpY2F0aW9uLWRldmVsb3BtZW50L2phdmEtZWUtOC1oaWdoLXBlcmZvcm1hbmNl&_s=ZXJpZTE%3D&_c=5ede79c4
Post by r***@e1b.org
Post by Romain Manni-Bucau
1. With the security manager disabled, the ear deploys fine, ejb's
instantitiate, initialize, etc -- no errors at all!
2. I connected to the running jvm with jmx, and poked around for a
while,
Post by Romain Manni-Bucau
but could not find where it specified the policy file Tomcat was
using.
Post by r***@e1b.org
Post by Romain Manni-Bucau
Can I get a hint as to where this info is?
Thanks,
Ross
Date: 06/27/2018 04:54 PM
Subject: Re: EAR deployment
Hi
can you confirm it works without the security manager enabled?
Also can you check connecting on the JVM through JMX that the right
policy
Post by Romain Manni-Bucau
file is used and tomcat didn't override the one you thought using?
Romain Manni-Bucau
@rmannibucau <
https://milton-web.wnyric.org/canit/urlproxy.php?_q=aHR0cHM6Ly90d2l0dGVyLmNvbS9ybWFubmlidWNhdQ%3D%3D&_s=ZXJpZTE%3D&_c=7b6344b3
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
| Blog
<
https://milton-web.wnyric.org/canit/urlproxy.php?_q=aHR0cHM6Ly9ybWFubmlidWNhdS5tZXRhd2VyeC5uZXQv&_s=ZXJpZTE%3D&_c=03b3f7d2
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
| Old Blog
<
https://milton-web.wnyric.org/canit/urlproxy.php?_q=aHR0cDovL3JtYW5uaWJ1Y2F1LndvcmRwcmVzcy5jb20%3D&_s=ZXJpZTE%3D&_c=7ac52c4b
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
| Github <
https://milton-web.wnyric.org/canit/urlproxy.php?_q=aHR0cHM6Ly9naXRodWIuY29tL3JtYW5uaWJ1Y2F1&_s=ZXJpZTE%3D&_c=d53ffcf9
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
|
LinkedIn <
https://milton-web.wnyric.org/canit/urlproxy.php?_q=aHR0cHM6Ly93d3cubGlua2VkaW4uY29tL2luL3JtYW5uaWJ1Y2F1&_s=ZXJpZTE%3D&_c=aff046f7
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
| Book
<
https://milton-web.wnyric.org/canit/urlproxy.php?_q=aHR0cHM6Ly93d3cucGFja3RwdWIuY29tL2FwcGxpY2F0aW9uLWRldmVsb3BtZW50L2phdmEtZWUtOC1oaWdoLXBlcmZvcm1hbmNl&_s=ZXJpZTE%3D&_c=5ede79c4
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
I'm running 7.0.4. I have been deploying to webapps (<Deployments
dir="apps" /> remains commented).
Ross
Date: 06/27/2018 12:22 PM
Subject: Re: EAR deployment
Hi
What version of TomEE are you running?
Are you deploying your EAR from webapps, or from apps with
<Deployments
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
dir="apps" /> added in tomee.xml?
Regards
Jon
Post by r***@e1b.org
I seem unable to deploy EARs. I have set the catalina.policy
grant {
permission java.security.AllPermission;
};
I have set the work directory to "work" (and at deploy see the
exploded
Post by Romain Manni-Bucau
Post by r***@e1b.org
EAR there).
Also I have set deployOnStartup to false, autoDeploy to true, and
unpackWARs to true.
On deploy, at first matters look promising. It unpacks,
initializes
Post by Romain Manni-Bucau
my
Post by Romain Manni-Bucau
Post by r***@e1b.org
EJBs, then I get single AccessContorlException
(RuntimePermistion),
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
Post by r***@e1b.org
followed by an infinitely repeating (every 5 seconds or so) access
control
Post by r***@e1b.org
exception (FilePermission).
INFO: Created Ejb(deployment-id=CloseEventsBean,
ejb-name=CloseEventsBean,
container=Default Singleton Container)
Jun 26, 2018 11:41:40 AM
org.apache.openejb.assembler.classic.Assembler
Post by Romain Manni-Bucau
Post by r***@e1b.org
startEjbs
INFO: Created Ejb(deployment-id=ManagerReminderBean,
ejb-name=ManagerReminderBean, container=Default Singleton
Container)
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
Post by r***@e1b.org
Jun 26, 2018 11:41:40 AM sun.reflect.NativeMethodAccessorImpl
invoke
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
Post by r***@e1b.org
java.security.AccessControlException: access denied
("java.lang.RuntimePermission" "setContextClassLoader")
at
java.security.AccessControlContext.checkPermission(
AccessControlContext.java:472)
at
java.security.AccessController.checkPermission(AccessController.java:884)
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
Post by r***@e1b.org
at
java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
Post by r***@e1b.org
at
java.lang.Thread.setContextClassLoader(Thread.java:1474)
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
Post by r***@e1b.org
at
org.apache.openejb.log.LoggerCreator$Get.exec(LoggerCreator.java:94)
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
Post by r***@e1b.org
at
org.apache.openejb.log.LoggerCreator$Get.exec(LoggerCreator.java:105)
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
Post by r***@e1b.org
at
org.apache.openejb.util.JuliLogStream.isWarnEnabled(JuliLogStream.java:61)
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
Post by r***@e1b.org
at
org.apache.openejb.util.Logger.isWarningEnabled(Logger.java:425)
at org.apache.openejb.util.Logger.warning(Logger.java:646)
at
org.apache.tomee.catalina.TomcatWebAppBuilder.checkHost(
TomcatWebAppBuilder.java:2233)
at
org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(
GlobalListenerSupport.java:141)
at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(
LifecycleBase.java:94)
at
org.apache.catalina.core.ContainerBase.backgroundProcess(
ContainerBase.java:1164)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
Post by r***@e1b.org
processChildren(ContainerBase.java:1388)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
Post by r***@e1b.org
processChildren(ContainerBase.java:1392)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
Post by r***@e1b.org
run(ContainerBase.java:1360)
at java.lang.Thread.run(Thread.java:748)
Below is the repeating exception.
Jun 26, 2018 11:41:50 AM sun.reflect.NativeMethodAccessorImpl
invoke
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
Post by r***@e1b.org
java.security.AccessControlException: access denied
("java.io.FilePermission" "C:\IBM\liferay\tomee\webapps\ROOT.war"
"read")
Post by r***@e1b.org
at
java.security.AccessControlContext.checkPermission(
AccessControlContext.java:472)
at
java.security.AccessController.checkPermission(AccessController.java:884)
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
Post by r***@e1b.org
at
java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
Post by r***@e1b.org
at
java.lang.SecurityManager.checkRead(SecurityManager.java:888)
Post by Romain Manni-Bucau
Post by r***@e1b.org
at java.io.File.exists(File.java:814)
at
org.apache.catalina.startup.HostConfig.checkResources(
HostConfig.java:1296)
at
org.apache.catalina.startup.HostConfig.check(HostConfig.java:1623)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:314)
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
Post by r***@e1b.org
at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(
LifecycleBase.java:94)
at
org.apache.catalina.core.ContainerBase.backgroundProcess(
ContainerBase.java:1164)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
Post by r***@e1b.org
processChildren(ContainerBase.java:1388)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
Post by r***@e1b.org
processChildren(ContainerBase.java:1392)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
Post by r***@e1b.org
run(ContainerBase.java:1360)
at java.lang.Thread.run(Thread.java:748)
What am I missing? I can see that the exception implies
additional
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
Post by r***@e1b.org
permissions, but why doesn't my blanket grant of all permission in
the
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
Post by r***@e1b.org
catalina policy file cover this?
Ross
This electronic message and any attachments may contain
confidential
Post by r***@e1b.org
Post by Romain Manni-Bucau
or
Post by Romain Manni-Bucau
Post by r***@e1b.org
privileged information, and is intended only for the individual or
entity
Post by r***@e1b.org
identified above as the addressee. If you are not the addressee
(or
Post by r***@e1b.org
Post by Romain Manni-Bucau
the
Post by Romain Manni-Bucau
Post by r***@e1b.org
employee or agent responsible to deliver it to the addressee), or
if
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
this
Post by r***@e1b.org
message has been addressed to you in error, you are hereby
notified
Post by r***@e1b.org
Post by Romain Manni-Bucau
that
Post by Romain Manni-Bucau
Post by r***@e1b.org
you may not copy, forward, disclose or use any part of this
message
Post by r***@e1b.org
or
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
any
Post by r***@e1b.org
attachments. Please notify the sender immediately by return e-mail
or
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
Post by r***@e1b.org
telephone and delete this message from your system.
--
BEGIN-ANTISPAM-VOTING-LINKS
------------------------------------------------------
https://milton-web.wnyric.org/canit/b.php?c=s&i=01W3QmO1O&m=2bb7a21db8c9&t=20180627
https://milton-web.wnyric.org/canit/b.php?c=n&i=01W3QmO1O&m=2bb7a21db8c9&t=20180627
https://milton-web.wnyric.org/canit/b.php?c=f&i=01W3QmO1O&m=2bb7a21db8c9&t=20180627
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
------------------------------------------------------
END-ANTISPAM-VOTING-LINKS
This electronic message and any attachments may contain confidential
or
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
privileged information, and is intended only for the individual or
entity
Post by Romain Manni-Bucau
identified above as the addressee. If you are not the addressee (or
the
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
employee or agent responsible to deliver it to the addressee), or if
this
Post by Romain Manni-Bucau
message has been addressed to you in error, you are hereby notified
that
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
you may not copy, forward, disclose or use any part of this message
or
Post by r***@e1b.org
Post by Romain Manni-Bucau
any
Post by Romain Manni-Bucau
attachments. Please notify the sender immediately by return e-mail
or
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
telephone and delete this message from your system.
--
BEGIN-ANTISPAM-VOTING-LINKS
------------------------------------------------------
https://milton-web.wnyric.org/canit/b.php?c=s&i=05W3USVJt&m=03c723824a9b&t=20180627
https://milton-web.wnyric.org/canit/b.php?c=n&i=05W3USVJt&m=03c723824a9b&t=20180627
https://milton-web.wnyric.org/canit/b.php?c=f&i=05W3USVJt&m=03c723824a9b&t=20180627
Post by r***@e1b.org
Post by Romain Manni-Bucau
------------------------------------------------------
END-ANTISPAM-VOTING-LINKS
This electronic message and any attachments may contain confidential
or
Post by r***@e1b.org
Post by Romain Manni-Bucau
privileged information, and is intended only for the individual or
entity
Post by Romain Manni-Bucau
identified above as the addressee. If you are not the addressee (or
the
Post by r***@e1b.org
Post by Romain Manni-Bucau
employee or agent responsible to deliver it to the addressee), or if
this
Post by Romain Manni-Bucau
message has been addressed to you in error, you are hereby notified
that
Post by r***@e1b.org
Post by Romain Manni-Bucau
you may not copy, forward, disclose or use any part of this message or
any
Post by Romain Manni-Bucau
attachments. Please notify the sender immediately by return e-mail or
telephone and delete this message from your system.
--
BEGIN-ANTISPAM-VOTING-LINKS
------------------------------------------------------
https://milton-web.wnyric.org/canit/b.php?c=s&i=02W4fkxqC&m=d2fb064f979c&t=20180628
https://milton-web.wnyric.org/canit/b.php?c=n&i=02W4fkxqC&m=d2fb064f979c&t=20180628
https://milton-web.wnyric.org/canit/b.php?c=f&i=02W4fkxqC&m=d2fb064f979c&t=20180628
Post by r***@e1b.org
------------------------------------------------------
END-ANTISPAM-VOTING-LINKS
This electronic message and any attachments may contain confidential or
privileged information, and is intended only for the individual or
entity
Post by r***@e1b.org
identified above as the addressee. If you are not the addressee (or the
employee or agent responsible to deliver it to the addressee), or if
this
Post by r***@e1b.org
message has been addressed to you in error, you are hereby notified that
you may not copy, forward, disclose or use any part of this message or
any
Post by r***@e1b.org
attachments. Please notify the sender immediately by return e-mail or
telephone and delete this message from your system.
--
BEGIN-ANTISPAM-VOTING-LINKS
------------------------------------------------------
https://milton-web.wnyric.org/canit/b.php?c=s&i=05W4k3PHx&m=4665151ab5c3&t=20180628
https://milton-web.wnyric.org/canit/b.php?c=n&i=05W4k3PHx&m=4665151ab5c3&t=20180628
https://milton-web.wnyric.org/canit/b.php?c=f&i=05W4k3PHx&m=4665151ab5c3&t=20180628
------------------------------------------------------
END-ANTISPAM-VOTING-LINKS
This electronic message and any attachments may contain confidential or
privileged information, and is intended only for the individual or entity
identified above as the addressee. If you are not the addressee (or the
employee or agent responsible to deliver it to the addressee), or if this
message has been addressed to you in error, you are hereby notified that
you may not copy, forward, disclose or use any part of this message or any
attachments. Please notify the sender immediately by return e-mail or
telephone and delete this message from your system.
Jonathan Gallimore
2018-06-29 14:56:07 UTC
Permalink
I'll take a look - will be early next week before I can get to it.

Jon
Post by Romain Manni-Bucau
ears probably not (but you are not that numerous anymore ;)) but with a
security manager is more the criteria here IMHO.
Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> | Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/
rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
<https://www.packtpub.com/application-development/java-
ee-8-high-performance>
Post by r***@e1b.org
Not terribly familiar with Git, but I assume you asking me to submit a
pull request that points to a fix? The short answer is "no". I would
love to see this fixed, but right now I don't have the time to grok git
(we use svn), set up a build environment for Tomee, pickup maven (we use
ant+ivy), and figure out the actual bug. If I have to, I will --- but
only God knows how long it will be before I can make the time to do these
things.
But this raises a question: am I really the last person still deploying
EARs?! Really???
Thanks for your prompt help -- you guys are amazing!
Ross
Date: 06/28/2018 04:03 PM
Subject: Re: EAR deployment
I see
Then it is just a bug and we miss a wrapping to be SM compliant in that
part of the code.
Do you want to submit a PR to fix it?
Post by r***@e1b.org
Couldn't find it in the summary. Of course, its there as a VM
argument,
Post by r***@e1b.org
but I expect that. After digging around a bit more I found it in the
MXBeans: java.lang -> Runtime -> Attributes.
Every thing there is set as it is in the file: ie
java.security.policy=C:\IBM\liferay\tomee\conf\catalina.policy
java.security.manager=<no value>
-- both of which I would expect.
Note that I have not tried chang <Deployments dir="apps" /> in
tomee.xml.
Post by r***@e1b.org
Maybe that needs chaning -- though what I have seem really close to
working.
-Dcatalina.base="C:\IBM\liferay\tomee"
-Dcatalina.home="C:\IBM\liferay\tomee"
-Dwtp.deploy="C:\IBM\liferay\tomee\webapps"
-Djava.endorsed.dirs="C:\IBM\liferay\tomee\endorsed"
-Dfile.encoding=UTF8 -Djava.net.preferIPv4Stack=true
-Dorg.apache.catalina.loader.WebappClassLoader.ENABLE_
CLEAR_REFERENCES=false
Post by r***@e1b.org
Post by r***@e1b.org
-Duser.timezone=EST
-Djava.security.manager
-Djava.security.policy="C:\IBM\liferay\tomee\conf\catalina.policy"
-Djava.security.auth.login.config="C:\IBM\liferay\tomee\
conf\jaas.config"
Post by r***@e1b.org
Post by r***@e1b.org
-Dwnyric.deployment.properties.directory.path="C:\IBM\liferay"
-Xmx2048m
Thanks,
Ross
Date: 06/28/2018 11:20 AM
Subject: Re: EAR deployment
I think you can check it in the JVM info in system properties (VM
Summary)
Post by r***@e1b.org
Romain Manni-Bucau
@rmannibucau <
https://milton-web.wnyric.org/canit/urlproxy.php?_q=
aHR0cHM6Ly90d2l0dGVyLmNvbS9ybWFubmlidWNhdQ%3D%3D&_s=ZXJpZTE%3D&_c=7b6344b3
Post by r***@e1b.org
Post by r***@e1b.org
Post by Romain Manni-Bucau
| Blog
<
https://milton-web.wnyric.org/canit/urlproxy.php?_q=
aHR0cHM6Ly9ybWFubmlidWNhdS5tZXRhd2VyeC5uZXQv&_s=ZXJpZTE%3D&_c=03b3f7d2
Post by r***@e1b.org
Post by r***@e1b.org
Post by Romain Manni-Bucau
| Old Blog
<
https://milton-web.wnyric.org/canit/urlproxy.php?_q=
aHR0cDovL3JtYW5uaWJ1Y2F1LndvcmRwcmVzcy5jb20%3D&_s=ZXJpZTE%3D&_c=7ac52c4b
Post by r***@e1b.org
Post by r***@e1b.org
Post by Romain Manni-Bucau
| Github <
https://milton-web.wnyric.org/canit/urlproxy.php?_q=
aHR0cHM6Ly9naXRodWIuY29tL3JtYW5uaWJ1Y2F1&_s=ZXJpZTE%3D&_c=d53ffcf9
Post by r***@e1b.org
Post by r***@e1b.org
Post by Romain Manni-Bucau
|
LinkedIn <
https://milton-web.wnyric.org/canit/urlproxy.php?_q=
aHR0cHM6Ly93d3cubGlua2VkaW4uY29tL2luL3JtYW5uaWJ1Y2F1&_s=
ZXJpZTE%3D&_c=aff046f7
Post by r***@e1b.org
Post by r***@e1b.org
Post by Romain Manni-Bucau
| Book
<
https://milton-web.wnyric.org/canit/urlproxy.php?_q=
aHR0cHM6Ly93d3cucGFja3RwdWIuY29tL2FwcGxpY2F0aW9uLWRldmVsb3Bt
ZW50L2phdmEtZWUtOC1oaWdoLXBlcmZvcm1hbmNl&_s=ZXJpZTE%3D&_c=5ede79c4
Post by r***@e1b.org
Post by r***@e1b.org
Post by Romain Manni-Bucau
1. With the security manager disabled, the ear deploys fine, ejb's
instantitiate, initialize, etc -- no errors at all!
2. I connected to the running jvm with jmx, and poked around for a
while,
Post by Romain Manni-Bucau
but could not find where it specified the policy file Tomcat was
using.
Post by r***@e1b.org
Post by Romain Manni-Bucau
Can I get a hint as to where this info is?
Thanks,
Ross
Date: 06/27/2018 04:54 PM
Subject: Re: EAR deployment
Hi
can you confirm it works without the security manager enabled?
Also can you check connecting on the JVM through JMX that the right
policy
Post by Romain Manni-Bucau
file is used and tomcat didn't override the one you thought using?
Romain Manni-Bucau
@rmannibucau <
https://milton-web.wnyric.org/canit/urlproxy.php?_q=
aHR0cHM6Ly90d2l0dGVyLmNvbS9ybWFubmlidWNhdQ%3D%3D&_s=ZXJpZTE%3D&_c=7b6344b3
Post by r***@e1b.org
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
| Blog
<
https://milton-web.wnyric.org/canit/urlproxy.php?_q=
aHR0cHM6Ly9ybWFubmlidWNhdS5tZXRhd2VyeC5uZXQv&_s=ZXJpZTE%3D&_c=03b3f7d2
Post by r***@e1b.org
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
| Old Blog
<
https://milton-web.wnyric.org/canit/urlproxy.php?_q=
aHR0cDovL3JtYW5uaWJ1Y2F1LndvcmRwcmVzcy5jb20%3D&_s=ZXJpZTE%3D&_c=7ac52c4b
Post by r***@e1b.org
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
| Github <
https://milton-web.wnyric.org/canit/urlproxy.php?_q=
aHR0cHM6Ly9naXRodWIuY29tL3JtYW5uaWJ1Y2F1&_s=ZXJpZTE%3D&_c=d53ffcf9
Post by r***@e1b.org
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
|
LinkedIn <
https://milton-web.wnyric.org/canit/urlproxy.php?_q=
aHR0cHM6Ly93d3cubGlua2VkaW4uY29tL2luL3JtYW5uaWJ1Y2F1&_s=
ZXJpZTE%3D&_c=aff046f7
Post by r***@e1b.org
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
| Book
<
https://milton-web.wnyric.org/canit/urlproxy.php?_q=
aHR0cHM6Ly93d3cucGFja3RwdWIuY29tL2FwcGxpY2F0aW9uLWRldmVsb3Bt
ZW50L2phdmEtZWUtOC1oaWdoLXBlcmZvcm1hbmNl&_s=ZXJpZTE%3D&_c=5ede79c4
Post by r***@e1b.org
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
I'm running 7.0.4. I have been deploying to webapps (<Deployments
dir="apps" /> remains commented).
Ross
Date: 06/27/2018 12:22 PM
Subject: Re: EAR deployment
Hi
What version of TomEE are you running?
Are you deploying your EAR from webapps, or from apps with
<Deployments
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
dir="apps" /> added in tomee.xml?
Regards
Jon
Post by r***@e1b.org
I seem unable to deploy EARs. I have set the catalina.policy
grant {
permission java.security.AllPermission;
};
I have set the work directory to "work" (and at deploy see the
exploded
Post by Romain Manni-Bucau
Post by r***@e1b.org
EAR there).
Also I have set deployOnStartup to false, autoDeploy to true, and
unpackWARs to true.
On deploy, at first matters look promising. It unpacks,
initializes
Post by Romain Manni-Bucau
my
Post by Romain Manni-Bucau
Post by r***@e1b.org
EJBs, then I get single AccessContorlException
(RuntimePermistion),
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
Post by r***@e1b.org
followed by an infinitely repeating (every 5 seconds or so)
access
Post by r***@e1b.org
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
control
Post by r***@e1b.org
exception (FilePermission).
INFO: Created Ejb(deployment-id=CloseEventsBean,
ejb-name=CloseEventsBean,
container=Default Singleton Container)
Jun 26, 2018 11:41:40 AM
org.apache.openejb.assembler.classic.Assembler
Post by Romain Manni-Bucau
Post by r***@e1b.org
startEjbs
INFO: Created Ejb(deployment-id=ManagerReminderBean,
ejb-name=ManagerReminderBean, container=Default Singleton
Container)
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
Post by r***@e1b.org
Jun 26, 2018 11:41:40 AM sun.reflect.NativeMethodAccessorImpl
invoke
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
Post by r***@e1b.org
java.security.AccessControlException: access denied
("java.lang.RuntimePermission" "setContextClassLoader")
at
java.security.AccessControlContext.checkPermission(
AccessControlContext.java:472)
at
java.security.AccessController.checkPermission(
AccessController.java:884)
Post by r***@e1b.org
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
Post by r***@e1b.org
at
java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
Post by r***@e1b.org
at
java.lang.Thread.setContextClassLoader(Thread.java:1474)
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
Post by r***@e1b.org
at
org.apache.openejb.log.LoggerCreator$Get.exec(LoggerCreator.java:94)
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
Post by r***@e1b.org
at
org.apache.openejb.log.LoggerCreator$Get.exec(LoggerCreator.java:105)
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
Post by r***@e1b.org
at
org.apache.openejb.util.JuliLogStream.isWarnEnabled(
JuliLogStream.java:61)
Post by r***@e1b.org
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
Post by r***@e1b.org
at
org.apache.openejb.util.Logger.isWarningEnabled(Logger.java:425)
646)
Post by r***@e1b.org
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
Post by r***@e1b.org
at
org.apache.tomee.catalina.TomcatWebAppBuilder.checkHost(
TomcatWebAppBuilder.java:2233)
at
org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(
GlobalListenerSupport.java:141)
at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(
LifecycleBase.java:94)
at
org.apache.catalina.core.ContainerBase.backgroundProcess(
ContainerBase.java:1164)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
Post by r***@e1b.org
processChildren(ContainerBase.java:1388)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
Post by r***@e1b.org
processChildren(ContainerBase.java:1392)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
Post by r***@e1b.org
run(ContainerBase.java:1360)
at java.lang.Thread.run(Thread.java:748)
Below is the repeating exception.
Jun 26, 2018 11:41:50 AM sun.reflect.NativeMethodAccessorImpl
invoke
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
Post by r***@e1b.org
java.security.AccessControlException: access denied
("java.io.FilePermission" "C:\IBM\liferay\tomee\webapps\
ROOT.war"
Post by r***@e1b.org
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
"read")
Post by r***@e1b.org
at
java.security.AccessControlContext.checkPermission(
AccessControlContext.java:472)
at
java.security.AccessController.checkPermission(
AccessController.java:884)
Post by r***@e1b.org
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
Post by r***@e1b.org
at
java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
Post by r***@e1b.org
at
java.lang.SecurityManager.checkRead(SecurityManager.java:888)
Post by Romain Manni-Bucau
Post by r***@e1b.org
at java.io.File.exists(File.java:814)
at
org.apache.catalina.startup.HostConfig.checkResources(
HostConfig.java:1296)
at
org.apache.catalina.startup.HostConfig.check(HostConfig.
java:1623)
Post by r***@e1b.org
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
Post by r***@e1b.org
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(
HostConfig.java:314)
Post by r***@e1b.org
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
Post by r***@e1b.org
at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(
LifecycleBase.java:94)
at
org.apache.catalina.core.ContainerBase.backgroundProcess(
ContainerBase.java:1164)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
Post by r***@e1b.org
processChildren(ContainerBase.java:1388)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
Post by r***@e1b.org
processChildren(ContainerBase.java:1392)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
Post by r***@e1b.org
run(ContainerBase.java:1360)
at java.lang.Thread.run(Thread.java:748)
What am I missing? I can see that the exception implies
additional
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
Post by r***@e1b.org
permissions, but why doesn't my blanket grant of all permission
in
Post by r***@e1b.org
Post by r***@e1b.org
the
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
Post by r***@e1b.org
catalina policy file cover this?
Ross
This electronic message and any attachments may contain
confidential
Post by r***@e1b.org
Post by Romain Manni-Bucau
or
Post by Romain Manni-Bucau
Post by r***@e1b.org
privileged information, and is intended only for the individual
or
Post by r***@e1b.org
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
entity
Post by r***@e1b.org
identified above as the addressee. If you are not the addressee
(or
Post by r***@e1b.org
Post by Romain Manni-Bucau
the
Post by Romain Manni-Bucau
Post by r***@e1b.org
employee or agent responsible to deliver it to the addressee), or
if
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
this
Post by r***@e1b.org
message has been addressed to you in error, you are hereby
notified
Post by r***@e1b.org
Post by Romain Manni-Bucau
that
Post by Romain Manni-Bucau
Post by r***@e1b.org
you may not copy, forward, disclose or use any part of this
message
Post by r***@e1b.org
or
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
any
Post by r***@e1b.org
attachments. Please notify the sender immediately by return
e-mail
Post by r***@e1b.org
Post by r***@e1b.org
or
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
Post by r***@e1b.org
telephone and delete this message from your system.
--
BEGIN-ANTISPAM-VOTING-LINKS
------------------------------------------------------
https://milton-web.wnyric.org/canit/b.php?c=s&i=01W3QmO1O&m=
2bb7a21db8c9&t=20180627
Post by r***@e1b.org
https://milton-web.wnyric.org/canit/b.php?c=n&i=01W3QmO1O&m=
2bb7a21db8c9&t=20180627
Post by r***@e1b.org
https://milton-web.wnyric.org/canit/b.php?c=f&i=01W3QmO1O&m=
2bb7a21db8c9&t=20180627
Post by r***@e1b.org
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
------------------------------------------------------
END-ANTISPAM-VOTING-LINKS
This electronic message and any attachments may contain
confidential
Post by r***@e1b.org
Post by r***@e1b.org
or
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
privileged information, and is intended only for the individual or
entity
Post by Romain Manni-Bucau
identified above as the addressee. If you are not the addressee (or
the
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
employee or agent responsible to deliver it to the addressee), or
if
Post by r***@e1b.org
Post by r***@e1b.org
Post by Romain Manni-Bucau
this
Post by Romain Manni-Bucau
message has been addressed to you in error, you are hereby notified
that
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
you may not copy, forward, disclose or use any part of this message
or
Post by r***@e1b.org
Post by Romain Manni-Bucau
any
Post by Romain Manni-Bucau
attachments. Please notify the sender immediately by return e-mail
or
Post by r***@e1b.org
Post by Romain Manni-Bucau
Post by Romain Manni-Bucau
telephone and delete this message from your system.
--
BEGIN-ANTISPAM-VOTING-LINKS
------------------------------------------------------
https://milton-web.wnyric.org/canit/b.php?c=s&i=05W3USVJt&m=
03c723824a9b&t=20180627
Post by r***@e1b.org
https://milton-web.wnyric.org/canit/b.php?c=n&i=05W3USVJt&m=
03c723824a9b&t=20180627
Post by r***@e1b.org
https://milton-web.wnyric.org/canit/b.php?c=f&i=05W3USVJt&m=
03c723824a9b&t=20180627
Post by r***@e1b.org
Post by r***@e1b.org
Post by Romain Manni-Bucau
------------------------------------------------------
END-ANTISPAM-VOTING-LINKS
This electronic message and any attachments may contain confidential
or
Post by r***@e1b.org
Post by Romain Manni-Bucau
privileged information, and is intended only for the individual or
entity
Post by Romain Manni-Bucau
identified above as the addressee. If you are not the addressee (or
the
Post by r***@e1b.org
Post by Romain Manni-Bucau
employee or agent responsible to deliver it to the addressee), or if
this
Post by Romain Manni-Bucau
message has been addressed to you in error, you are hereby notified
that
Post by r***@e1b.org
Post by Romain Manni-Bucau
you may not copy, forward, disclose or use any part of this message
or
Post by r***@e1b.org
Post by r***@e1b.org
any
Post by Romain Manni-Bucau
attachments. Please notify the sender immediately by return e-mail or
telephone and delete this message from your system.
--
BEGIN-ANTISPAM-VOTING-LINKS
------------------------------------------------------
https://milton-web.wnyric.org/canit/b.php?c=s&i=02W4fkxqC&m=
d2fb064f979c&t=20180628
Post by r***@e1b.org
https://milton-web.wnyric.org/canit/b.php?c=n&i=02W4fkxqC&m=
d2fb064f979c&t=20180628
Post by r***@e1b.org
https://milton-web.wnyric.org/canit/b.php?c=f&i=02W4fkxqC&m=
d2fb064f979c&t=20180628
Post by r***@e1b.org
Post by r***@e1b.org
------------------------------------------------------
END-ANTISPAM-VOTING-LINKS
This electronic message and any attachments may contain confidential or
privileged information, and is intended only for the individual or
entity
Post by r***@e1b.org
identified above as the addressee. If you are not the addressee (or the
employee or agent responsible to deliver it to the addressee), or if
this
Post by r***@e1b.org
message has been addressed to you in error, you are hereby notified
that
Post by r***@e1b.org
Post by r***@e1b.org
you may not copy, forward, disclose or use any part of this message or
any
Post by r***@e1b.org
attachments. Please notify the sender immediately by return e-mail or
telephone and delete this message from your system.
--
BEGIN-ANTISPAM-VOTING-LINKS
------------------------------------------------------
https://milton-web.wnyric.org/canit/b.php?c=s&i=05W4k3PHx&m=
4665151ab5c3&t=20180628
Post by r***@e1b.org
https://milton-web.wnyric.org/canit/b.php?c=n&i=05W4k3PHx&m=
4665151ab5c3&t=20180628
Post by r***@e1b.org
https://milton-web.wnyric.org/canit/b.php?c=f&i=05W4k3PHx&m=
4665151ab5c3&t=20180628
Post by r***@e1b.org
------------------------------------------------------
END-ANTISPAM-VOTING-LINKS
This electronic message and any attachments may contain confidential or
privileged information, and is intended only for the individual or entity
identified above as the addressee. If you are not the addressee (or the
employee or agent responsible to deliver it to the addressee), or if this
message has been addressed to you in error, you are hereby notified that
you may not copy, forward, disclose or use any part of this message or
any
Post by r***@e1b.org
attachments. Please notify the sender immediately by return e-mail or
telephone and delete this message from your system.
ross.cohen
2018-08-10 14:23:04 UTC
Permalink
Any chance this got fixed in 7.0.5? My hopes aren't too high, and I already
have an ugly work-around, but still ...

Ross



--
Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html
Jonathan Gallimore
2018-08-10 16:53:57 UTC
Permalink
It didn't, sorry. I still want to work on it and should have time next
week. Are you able to share your security manager policy to help me debug
it through?

Jon
Post by ross.cohen
Any chance this got fixed in 7.0.5? My hopes aren't too high, and I already
have an ugly work-around, but still ...
Ross
--
http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html
r***@e1b.org
2018-08-13 14:15:50 UTC
Permalink
Security policy is very simple right now:

grant {
permission java.security.AllPermission;
};

Thanks!
Ross



From: "Jonathan Gallimore" <***@gmail.com>
To: ***@tomee.apache.org,
Date: 08/10/2018 12:54 PM
Subject: Re: EAR deployment



It didn't, sorry. I still want to work on it and should have time next
week. Are you able to share your security manager policy to help me debug
it through?

Jon
Post by ross.cohen
Any chance this got fixed in 7.0.5? My hopes aren't too high, and I already
have an ugly work-around, but still ...
Ross
--
https://milton-web.wnyric.org/canit/urlproxy.php?_q=aHR0cDovL3RvbWVlLW9wZW5lamIuOTc5NDQwLm40Lm5hYmJsZS5jb20vVG9tRUUtVXNlcnMtZjk3OTQ0MS5odG1s&_s=ZXJpZTE%3D&_c=37b3c580
--
BEGIN-ANTISPAM-VOTING-LINKS
------------------------------------------------------

Teach CanIt if this mail (ID 02WlsSioE) is spam:
Spam:
https://milton-web.wnyric.org/canit/b.php?c=s&i=02WlsSioE&m=9b4a3eadf679&t=20180810

Not spam:
https://milton-web.wnyric.org/canit/b.php?c=n&i=02WlsSioE&m=9b4a3eadf679&t=20180810

Forget vote:
https://milton-web.wnyric.org/canit/b.php?c=f&i=02WlsSioE&m=9b4a3eadf679&t=20180810

------------------------------------------------------
END-ANTISPAM-VOTING-LINKS





Confidentiality Notice:
This electronic message and any attachments may contain confidential or
privileged information, and is intended only for the individual or entity
identified above as the addressee. If you are not the addressee (or the
employee or agent responsible to deliver it to the addressee), or if this
message has been addressed to you in error, you are hereby notified that
you may not copy, forward, disclose or use any part of this message or any
attachments. Please notify the sender immediately by return e-mail or
telephone and delete this message from your system.
Jonathan Gallimore
2018-08-14 15:00:25 UTC
Permalink
Thanks, that's useful.

Jon
Post by r***@e1b.org
grant {
permission java.security.AllPermission;
};
Thanks!
Ross
Date: 08/10/2018 12:54 PM
Subject: Re: EAR deployment
It didn't, sorry. I still want to work on it and should have time next
week. Are you able to share your security manager policy to help me debug
it through?
Jon
Post by ross.cohen
Any chance this got fixed in 7.0.5? My hopes aren't too high, and I already
have an ugly work-around, but still ...
Ross
--
https://milton-web.wnyric.org/canit/urlproxy.php?_q=
aHR0cDovL3RvbWVlLW9wZW5lamIuOTc5NDQwLm40Lm5hYmJsZS5jb20vVG9t
RUUtVXNlcnMtZjk3OTQ0MS5odG1s&_s=ZXJpZTE%3D&_c=37b3c580
--
BEGIN-ANTISPAM-VOTING-LINKS
------------------------------------------------------
https://milton-web.wnyric.org/canit/b.php?c=s&i=02WlsSioE&m=
9b4a3eadf679&t=20180810
https://milton-web.wnyric.org/canit/b.php?c=n&i=02WlsSioE&m=
9b4a3eadf679&t=20180810
https://milton-web.wnyric.org/canit/b.php?c=f&i=02WlsSioE&m=
9b4a3eadf679&t=20180810
------------------------------------------------------
END-ANTISPAM-VOTING-LINKS
This electronic message and any attachments may contain confidential or
privileged information, and is intended only for the individual or entity
identified above as the addressee. If you are not the addressee (or the
employee or agent responsible to deliver it to the addressee), or if this
message has been addressed to you in error, you are hereby notified that
you may not copy, forward, disclose or use any part of this message or any
attachments. Please notify the sender immediately by return e-mail or
telephone and delete this message from your system.
Jonathan Gallimore
2018-08-20 09:53:27 UTC
Permalink
So I can explain a bit about what's going on here - everything goes ok with
the security manager switched on, up until the point where we pass through
OpenEJB's security service, at which point we do this:

final String moduleID = newContext.getBeanContext().getModuleID();
JavaSecurityManagers.setContextID(moduleID);

This sets a JACC security context which is then used to evaluate
permissions, which appears to reject the permission required (in this case
java.lang.RuntimePermission / setContextClassLoader). Further research,
and hazy memory of other conversations make me think that there are some
gaps in JACC in TomEE (
http://tomee-openejb.979440.n4.nabble.com/How-can-I-enable-JACC-in-TomEE-tp4673113p4679746.html).
It strikes me that we should be able to get this to work. It'll need a bit
more research on my part, however, so bear with me. Thoughts and discussion
are welcome.

Jon

On Tue, Aug 14, 2018 at 4:00 PM, Jonathan Gallimore <
Post by Jonathan Gallimore
Thanks, that's useful.
Jon
Post by r***@e1b.org
grant {
permission java.security.AllPermission;
};
Thanks!
Ross
Date: 08/10/2018 12:54 PM
Subject: Re: EAR deployment
It didn't, sorry. I still want to work on it and should have time next
week. Are you able to share your security manager policy to help me debug
it through?
Jon
Post by ross.cohen
Any chance this got fixed in 7.0.5? My hopes aren't too high, and I already
have an ugly work-around, but still ...
Ross
--
https://milton-web.wnyric.org/canit/urlproxy.php?_q=aHR0cDov
L3RvbWVlLW9wZW5lamIuOTc5NDQwLm40Lm5hYmJsZS5jb20vVG9tRUUtVXNl
cnMtZjk3OTQ0MS5odG1s&_s=ZXJpZTE%3D&_c=37b3c580
--
BEGIN-ANTISPAM-VOTING-LINKS
------------------------------------------------------
https://milton-web.wnyric.org/canit/b.php?c=s&i=02WlsSioE&m=
9b4a3eadf679&t=20180810
https://milton-web.wnyric.org/canit/b.php?c=n&i=02WlsSioE&m=
9b4a3eadf679&t=20180810
https://milton-web.wnyric.org/canit/b.php?c=f&i=02WlsSioE&m=
9b4a3eadf679&t=20180810
------------------------------------------------------
END-ANTISPAM-VOTING-LINKS
This electronic message and any attachments may contain confidential or
privileged information, and is intended only for the individual or entity
identified above as the addressee. If you are not the addressee (or the
employee or agent responsible to deliver it to the addressee), or if this
message has been addressed to you in error, you are hereby notified that
you may not copy, forward, disclose or use any part of this message or any
attachments. Please notify the sender immediately by return e-mail or
telephone and delete this message from your system.
r***@e1b.org
2018-08-31 14:40:33 UTC
Permalink
John,

Thanks for the update -- I appreciate you looking into this.

Ross



From: "Jonathan Gallimore" <***@gmail.com>
To: ***@tomee.apache.org,
Date: 08/20/2018 05:53 AM
Subject: Re: EAR deployment



So I can explain a bit about what's going on here - everything goes ok
with
the security manager switched on, up until the point where we pass through
OpenEJB's security service, at which point we do this:

final String moduleID = newContext.getBeanContext().getModuleID();
JavaSecurityManagers.setContextID(moduleID);

This sets a JACC security context which is then used to evaluate
permissions, which appears to reject the permission required (in this case
java.lang.RuntimePermission / setContextClassLoader). Further research,
and hazy memory of other conversations make me think that there are some
gaps in JACC in TomEE (
https://milton-web.wnyric.org/canit/urlproxy.php?_q=aHR0cDovL3RvbWVlLW9wZW5lamIuOTc5NDQwLm40Lm5hYmJsZS5jb20vSG93LWNhbi1JLWVuYWJsZS1KQUNDLWluLVRvbUVFLXRwNDY3MzExM3A0Njc5NzQ2Lmh0bWw%3D&_s=ZXJpZTE%3D&_c=0f754806
).
It strikes me that we should be able to get this to work. It'll need a bit
more research on my part, however, so bear with me. Thoughts and
discussion
are welcome.

Jon

On Tue, Aug 14, 2018 at 4:00 PM, Jonathan Gallimore <
Post by Jonathan Gallimore
Thanks, that's useful.
Jon
Post by r***@e1b.org
grant {
permission java.security.AllPermission;
};
Thanks!
Ross
Date: 08/10/2018 12:54 PM
Subject: Re: EAR deployment
It didn't, sorry. I still want to work on it and should have time next
week. Are you able to share your security manager policy to help me debug
it through?
Jon
Post by ross.cohen
Any chance this got fixed in 7.0.5? My hopes aren't too high, and I already
have an ugly work-around, but still ...
Ross
--
https://milton-web.wnyric.org/canit/urlproxy.php?_q=aHR0cDov
L3RvbWVlLW9wZW5lamIuOTc5NDQwLm40Lm5hYmJsZS5jb20vVG9tRUUtVXNl
cnMtZjk3OTQ0MS5odG1s&_s=ZXJpZTE%3D&_c=37b3c580
--
BEGIN-ANTISPAM-VOTING-LINKS
------------------------------------------------------
https://milton-web.wnyric.org/canit/b.php?c=s&i=02WlsSioE&m=
9b4a3eadf679&t=20180810
https://milton-web.wnyric.org/canit/b.php?c=n&i=02WlsSioE&m=
9b4a3eadf679&t=20180810
https://milton-web.wnyric.org/canit/b.php?c=f&i=02WlsSioE&m=
9b4a3eadf679&t=20180810
------------------------------------------------------
END-ANTISPAM-VOTING-LINKS
This electronic message and any attachments may contain confidential or
privileged information, and is intended only for the individual or entity
identified above as the addressee. If you are not the addressee (or the
employee or agent responsible to deliver it to the addressee), or if this
message has been addressed to you in error, you are hereby notified that
you may not copy, forward, disclose or use any part of this message or any
attachments. Please notify the sender immediately by return e-mail or
telephone and delete this message from your system.
--
BEGIN-ANTISPAM-VOTING-LINKS
------------------------------------------------------

Teach CanIt if this mail (ID 04WplRxa3) is spam:
Spam:
https://milton-web.wnyric.org/canit/b.php?c=s&i=04WplRxa3&m=cae8652407e2&t=20180820

Not spam:
https://milton-web.wnyric.org/canit/b.php?c=n&i=04WplRxa3&m=cae8652407e2&t=20180820

Forget vote:
https://milton-web.wnyric.org/canit/b.php?c=f&i=04WplRxa3&m=cae8652407e2&t=20180820

------------------------------------------------------
END-ANTISPAM-VOTING-LINKS





Confidentiality Notice:
This electronic message and any attachments may contain confidential or
privileged information, and is intended only for the individual or entity
identified above as the addressee. If you are not the addressee (or the
employee or agent responsible to deliver it to the addressee), or if this
message has been addressed to you in error, you are hereby notified that
you may not copy, forward, disclose or use any part of this message or any
attachments. Please notify the sender immediately by return e-mail or
telephone and delete this message from your system.
Loading...