0

Sorry I can't share the whole java code, due to the company policy. I'm using payara 4.1.2.183, Netbeans 13 and Java 1.8.0_341

I have setup a local dev environment for the project in my job and it worked fine for the whole friday. Monday brought some problems, so to list them all:

  • I can't access payara administrator console, it keeps on loading
  • Deploying application through netbeans shows following errors:
WARNING:   Policy configuration factory overridden by property javax.security.jacc.PolicyConfigurationFactory.provider with value com.censored.security.jaaf.jacc.JAAFPolicyConfigurationFactoryImpl
INFO:   Loading policy provider com.censored.security.jaaf.jacc.JAAFPolicyProvider jaafProvider.
SEVERE:   Error while installing policy provider: com.censored.security.jaaf.jacc.JAAFPolicyProvider jaafProvider.
SEVERE:   Exception while deploying the app [censored]
SEVERE:   Exception during lifecycle processing


SEVERE:   Exception while deploying the app [censored] : A MultiException has 2 exceptions.  They are:
1. com.sun.enterprise.security.SecurityLifecycleException
2. java.lang.IllegalStateException: Unable to perform operation: post construct on com.sun.enterprise.security.SecurityLifecycle
com.sun.enterprise.security.SecurityLifecycleException

WARNING:   Policy configuration factory overridden by property javax.security.jacc.PolicyConfigurationFactory.provider with value com.censored.security.jaaf.jacc.JAAFPolicyConfigurationFactoryImpl
INFO:   Loading policy provider com.censored.security.jaaf.jacc.JAAFPolicyProvider jaafProvider.
SEVERE:   Error while installing policy provider: com.censored.security.jaaf.jacc.JAAFPolicyProvider jaafProvider.
SEVERE:   Exception while deploying the app [censored]
SEVERE:   Exception during lifecycle processing

SEVERE:   Exception while deploying the app [censored] : A MultiException has 2 exceptions.  They are:
1. com.sun.enterprise.security.SecurityLifecycleException
2. java.lang.IllegalStateException: Unable to perform operation: post construct on com.sun.enterprise.security.SecurityLifecycle

Does anyone know how to resolve them?

skomisa
  • 16,436
  • 7
  • 61
  • 102
  • [1] What is _"payara 412.183"_? Do you actually mean _"Payara 4.12.173"_? If so, correct accordingly. Otherwise, update your question to link to the Payara version you are using. [2] Also update your questions with the exact versions of Java and NetBeans being used. [3] Was starting Payara within NetBeans definitely working before the weekend? [4] Was there possibly some network or environment change over the weekend to provoke this issue? – skomisa Aug 10 '22 at 02:32
  • Sorry, it's 4.1.2.183 according to readme. I'm using Netbeans 13 with java version "1.8.0_341". Yes, it definitely worked before weekend, and there was no trigger to change that. My predecessor had similiar issues - his local dev environment also stopped working after a day, and he couldn't fix it. – user19727086 Aug 10 '22 at 08:31
  • OK. I can't explain what caused things to change over the weekend, but that's moot because you are running NetBeans 13 with Java 1.8. That is not a valid pairing. From the NetBeans 13 Release Notes, with my emphasis added: ["_The Apache **NetBeans 13 binary releases require JDK 11+**, and officially support running on JDK 11 and JDK 17_"](https://netbeans.apache.org/download/nb13/nb13.html). So either upgrade to JDK 11 or later, or downgrade to NetBeans 12.5 or earlier. – skomisa Aug 10 '22 at 18:33
  • Also, since you are running Payara 4.x, you must use Java 1.8 (["If you need support for JDK11, upgrade to Payara Platform 5."](https://www.payara.fish/enterprise/openjdk-support/)), so you should downgrade to NetBeans 12.5 (not 12.6!). An alternative approach would be to migrate to NetBeans 13 with JDK 11+ and Payara 5, but that is obviously a non-trivial upgrade. – skomisa Aug 10 '22 at 18:43
  • Great idea, I will downgrade to NetBeans 12.5 right away! – user19727086 Aug 11 '22 at 12:48
  • OK. If that approach solves your problem, please consider posting an answer since that is much more helpful to the community than an unresolved discussion in the comments. – skomisa Aug 11 '22 at 14:30
  • Well, unfortunately, this didn't help :c. I think that if payara can't load the admin console (localhost:4848) then it's something wrong with the server itself. Unfortunately it's a custom one made for our client. – user19727086 Aug 11 '22 at 14:36
  • Re _"it's a custom one made for our client"_: that information seems highly relevant, and definitely belongs in your question, but I'm not sure anyone outside of your team will be able to resolve this if customization is involved. Regardless: [1] Stick with valid combinations of NetBeans/Java/Payara. [2] Perhaps focus on what may have changed over the weekend? [3] Have you tried starting your Payara server externally. (i.e. From the command line rather than within NetBeans)? If so, does it still give the same errors? – skomisa Aug 11 '22 at 18:14
  • Yes, I started it from command line and it still gave the following errors. – user19727086 Aug 12 '22 at 07:31
  • OK. Since you also get the same problems when starting from the command line, this look like a Payara issue, and even mentioning NetBeans is a distraction. Are you able to detail the customization that has been done? Also, consider creating a separate "clean" throwaway instance of Payara 4.1.2.183, and verify that it starts properly from the command line, and its console works. If it does then the issue is with your customization (right?), and if it doesn't you must have some environment issue(s). – skomisa Aug 18 '22 at 04:36
  • Then sorry for mentioning NetBeans :c I tried doing it fresh with new both Payara 4 and 5. Admin console worked for the first time, and then stopped in both cases. So, regarding the customization: 1. First there was the maven setup with the encrypted master password and nexus repositories passwords. They have been put in .m2/settings-security.xml 2. Adding local variables for our server and adding myself as its admin. 3. Creating the proper users with groups in Payara 4. Setting up local JDBC connection pools 5. Setting up JAAF security – user19727086 Aug 19 '22 at 10:26

0 Answers0