WASdev / ci.docker.websphere-traditional

Dockerfiles for WebSphere Application Server traditional
Apache License 2.0
171 stars 192 forks source link

classloader issue docker 9.0.0.9-profile #150

Closed geirwr closed 5 years ago

geirwr commented 5 years ago

https://developer.ibm.com/answers/questions/495358/random-issues-on-webpshere-traditional-docker-tag.html we are using ibm docker container https://hub.docker.com/r/ibmcom/websphere-traditional and tag 9.0.0.9-profile

This container is wokring excellent in most environments, like win, osx, ubuntu 16.04/18.04.

But then it gives the failure below in some environments: Caused by: javax.persistence.PersistenceException: java.lang.ClassNotFoundException: com.ibm.websphere.persistence.PersistenceProviderImpl

It is of course exact same docker container, and application in the various enviroments.

We have found this documentation to shed some light on the issue: https://www.ibm.com/support/knowledgecenter/en/SSAW57_9.0.0/com.ibm.websphere.nd.multiplatform.doc/ae/tejb_jpatroubleshoot.html The application is using JPA 2.1, but bringing it's own persistenceprovider. Reason being that this application is deployed to various servers, not only a WAS JEE server.

We have also tried setting alternate persistenceprovider via wsadmin, but changes are not reflected in web console. AdminConfig.create(AdminConfig.list("JavaPersistenceAPIService", AdminConfig.getid('/Server:server1/')), '[ [enable true] [defaultPersistenceProvider "org.hibernate.jpa.HibernatePersistenceProvider"] [defaultJTADataSourceJNDIName ""] [defaultNonJTADataSourceJNDIName ""] ]') AdminTask.modifyJPASpecLevel(AdminConfig.getid('/Server:server1/'), '[-specLevel 2.1]') And the strange thing is that these changes to persistenceprovider is not required in most environments. We are also setting classloading to "parent last" for web module and application.

Any idea on how to switch the radio button so that wsadmin changes are reflected correctly in web console? Could it be that 9.0.0.9-profile have some "challenges" if ubuntu 18.04, or if hostname is not resolved correctly. Would it be relevant to step to 9.0.0.10-latest? Will there be a 9.0.0.10-profile prepared. see https://github.com/WASdev/ci.docker.websphere-traditional/issues/99