Reputation: 6079
I am trying to run this jberet java batch program in z/OS but, getting the following exception. This seems to be something wrt permissions in z/OS because, the same executable (fat/uber) jar ran fine in the windows machines.
Oct 05, 2017 9:07:41 AM org.jboss.weld.bootstrap.WeldStartup <clinit>
INFO: WELD-000900: 2.4.5 (Final) Oct 05, 2017 9:07:41 AM org.jboss.weld.environment.deployment.discovery.ReflectionDiscoveryStrategy processAnnotatedDiscovery
INFO: WELD-ENV-000014: Falling back to Java Reflection for bean-discovery-mode="annotated" discovery. Add org.jboss:jandex to the classpath to speed-up startup.
Exception in thread "main" java.util.ServiceConfigurationError: javax.batch.operations.JobOperator: Provider org.jberet.operations.JobOperatorImpl could not be instantiated
at java.util.ServiceLoader.fail(ServiceLoader.java:236)
at java.util.ServiceLoader.access$100(ServiceLoader.java:193)
at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:389)
at java.util.ServiceLoader$1.next(ServiceLoader.java:457)
at javax.batch.runtime.BatchRuntime$1.run(BatchRuntime.java:51)
at javax.batch.runtime.BatchRuntime$1.run(BatchRuntime.java:46)
at java.security.AccessController.doPrivileged(AccessController.java:396)
at javax.batch.runtime.BatchRuntime.getJobOperator(BatchRuntime.java:46)
at com.citi.Report.App.main(App.java:18)
Caused by: com.ibm.crypto.hdwrCCA.provider.JCECCARuntimeException: Hardware error from call CSNBRNGL returnCode 8 reasonCode 16000
at com.ibm.crypto.hdwrCCA.provider.SecureRandom.engineNextBytes(SecureRandom.java:40)
at java.security.SecureRandom.nextBytes(SecureRandom.java:470)
at java.util.UUID.randomUUID(UUID.java:157)
at org.jboss.weld.environment.se.Weld.initialize(Weld.java:779)
at org.jberet.se.SEArtifactFactory.<init>(SEArtifactFactory.java:29)
at org.jberet.se.BatchSEEnvironment.getArtifactFactory(BatchSEEnvironment.java:133)
at org.jberet.operations.JobOperatorImpl.<init>(JobOperatorImpl.java:93)
at java.lang.J9VMInternals.newInstanceImpl(Native Method)
at java.lang.Class.newInstance(Class.java:1887)
at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:385)
... 6 more
What could be the solution for this error ?
Hardware error from call CSNBRNGL returnCode 8 reasonCode 16000
Update: This batch program does not read/write to any mainframe files , it is just a hello world example. Few significant things this batch program does 1. WELD reading the beans.xml 2. JBeret reading the JBERET.properties 3. Create a H2 DB for using as job repository
Am wondering if any of these could be needing those additional permissions.
Upvotes: 0
Views: 296
Reputation: 11921
The IBM JCE-implementation tries to call the cryptgraphic service CSNBRNGL
which fails.
Reason code 16000 says
RACF failed your request to use this service.
Looking further one can find that the user executing the code needs access (READ should be sufficient) to the resource CSFRNGL
in the class CSFSERV
.
Since there will probably some more services that are required it probably is not the only resource that you need to access, so perhaps a generic profile along the lines of CSF*
could be considered.
See here for a list of all CSFSERV
RACF-resources and the services they protect.
Upvotes: 3