Unable to connect config client with config server when deployed in the weblogic - spring

I am facing issue when we deployed config server and config client in weblogic server and run it as part of same process which is running on port 7001.
In client app, configured URL to point config-server(http://localhost:7001/) but its not able to connect, whhile troubleshooting, getting below issue -
2022-10-17 20:04:15,234 INFO org.springframework.boot.context.config.ConfigDataLoader [[STANDBY] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'] Fetching config from server at : http://localhost:7001/
2022-10-17 20:04:15,234 INFO org.springframework.boot.context.config.ConfigDataLoader [[STANDBY] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'] Connect Timeout Exception on Url - http://localhost:7001/. Will be trying the next url if available
2022-10-17 20:04:15,234 WARN org.springframework.boot.context.config.ConfigDataLoader [[STANDBY] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'] Could not locate PropertySource ([ConfigServerConfigDataResource#2fe99575 uris = array<String>['http://localhost:7001/'], optional = true, profiles = list['production']]): I/O error on GET request for "http://localhost:7001/common-service,employee-service/production": Tried all: '2' addresses, but could not connect over HTTP to server: 'localhost', port: '7001'
Due to this , unable to fetch properties.
However, if I run same codebase of config-server as a separate process and point that url from client application which is deployed on weblogic 7001 port, then able to connect (http://localhost:8079/)
2022-10-17 20:40:41,434 DEBUG com.oraclecorp.cc.wstemplate.ServletInitializer [[ACTIVE] ExecuteThread: '6' for queue: 'weblogic.kernel.Default (self-tuning)'] Running with Spring Boot v2.5.14, Spring v5.3.20
2022-10-17 20:40:41,435 INFO com.oraclecorp.cc.wstemplate.ServletInitializer [[ACTIVE] ExecuteThread: '6' for queue: 'weblogic.kernel.Default (self-tuning)'] The following 1 profile is active: "production"
2022-10-17 20:40:41,499 INFO org.springframework.boot.context.config.ConfigDataLoader [[ACTIVE] ExecuteThread: '6' for queue: 'weblogic.kernel.Default (self-tuning)'] Fetching config from server at : http://localhost:8079/
2022-10-17 20:40:41,499 INFO org.springframework.boot.context.config.ConfigDataLoader [[ACTIVE] ExecuteThread: '6' for queue: 'weblogic.kernel.Default (self-tuning)'] Located environment: name=common-service,employee-service, profiles=[production], label=null, version=1c8f98727c7e2e6f0892e8e7d4a5174e0b5b2220, state=null
Please let me know if anyone has any idea or came across with similar situations.

Related

Weblogic Server failed to start -NullPointerException

I was unable to start the server , its getting stopped with below error. Can any one please suggest solutions?
<AdminServer> <main> <<WLS Kernel>> <> <> <Server subsystem failed. Reason:
java.lang.NullPointerException
java.lang.NullPointerException
at weblogic.deploy.internal.adminserver.DeploymentManager.getPendingDeploymentsForEditLockOwner(DeploymentManager.java:360)
at weblogic.management.provider.internal.EditAccessImpl.removePendingUpdateTasks(EditAccessImpl.java:560)
at weblogic.management.provider.internal.EditAccessImpl.undoUnsavedChanges(EditAccessImpl.java:555)
at weblogic.management.provider.internal.EditAccessImpl.acquireLock(EditAccessImpl.java:264)
at weblogic.management.provider.internal.EditAccessImpl.startEdit(EditAccessImpl.java:289)
at weblogic.management.deploy.ApplicationsDirPoller.removeStagedFilesForAppsRemovedSinceLastShutdown(ApplicationsDirPoller.java:426)
at weblogic.management.deploy.internal.DeploymentServerService.initializeApplicationPoller(DeploymentServerService.java:274)
at weblogic.management.deploy.internal.DeploymentServerService.startAdminServerDeploymentService(DeploymentServerService.java:233)
at weblogic.management.deploy.internal.DeploymentServerService.init(DeploymentServerService.java:154)
at weblogic.management.deploy.internal.DeploymentPreStandbyServerService.start(DeploymentPreStandbyServerService.java:26)
at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
Issue is resolved after adding container-descriptor in weblogic.xml as below.
<wls:container-descriptor>
<wls:prefer-web-inf-classes>true</wls:prefer-web-inf-classes>
</wls:container-descriptor>
<wls:session-descriptor>
<wls:timeout-secs>900</wls:timeout-secs>
<wls:persistent-store-type>replicated_if_clustered</wls:persistent-store-type>
</wls:session-descriptor>

The Message-Driven EJB unable to connect JMS Destination stating Error creating the db_connection

we have Oracle OSB 11g which is connecting to Oracle 12C DB in remote location or a different LAN.
THE WebLogic EJBs connecting to Oracle AQs via JMS/JDBC and currently we are having issues with them.
the WLS logs says:
####<Sep 21, 2018 9:15:51.083 AM GMT+00:00> <Warning> <EJB> <10.170.128.102>
<osb02_m1> <[ACTIVE] ExecuteThread: '18' for queue: 'weblogic.kernel.Default
(self-tuning)'> <<anonymous>> <>
<e10b4740d6c6fa2e:-5f6b2f84:165f9d83f34:-8000-0000000000000f87>
<1537521351083> <BEA-010096> <The Message-Driven EJB:
RequestEJB3103778799539238415X86e7f92.165e6e1ae31.X725d is unable to connect
to the JMS destination or bind to JCA resource adapter: queue/ProvRequestAQ.
Connection failed after 2,609 attempts. The MDB will attempt to
reconnect/rebind every 10 seconds. This log message will repeat every 600
seconds until the condition clears.>
####<Sep 21, 2018 9:15:51.083 AM GMT+00:00> <Warning> <EJB> <10.170.128.102>
<osb02_m1> <[ACTIVE] ExecuteThread: '18' for queue: 'weblogic.kernel.Default
(self-tuning)'> <<anonymous>> <>
<e10b4740d6c6fa2e:-5f6b2f84:165f9d83f34:-8000-0000000000000f87>
<1537521351083> <BEA-010061> <The Message-Driven EJB:
RequestEJB3103778799539238415X86e7f92.165e6e1ae31.X725d is unable to connect
to the JMS destination: queue/ProvRequestAQ. The Error was:
oracle.jms.AQjmsException: Error creating the db_connection
Nested exception: java.lang.UnsupportedOperationException: Remote JDBC
disabled
Nested exception: java.lang.UnsupportedOperationException: Remote JDBC
disabled>
I searched in internet and found the solution that I have to add the below parameter and add to setDomainEnv.sh and restart the WebLogic admins and managed servers, but still this issue is not resolved. I also checked that the DB User used to connect the DB has enqueue/dequeue privileges over the Oracle queues.
Parameter was
WLS_JDBC_REMOTE_ENABLED="-Dweblogic.jdbc.remoteEnabled=true"
I think the parameter must be added to the startup parameters of your managed servers from your domain console. After adding the parameter restart your managed servers.
The requested parameter might give some trouble on weblogic 12.1.3. As a matter of fact the parameter is deprecated since weblogic 10.3.6.
If you are still in trouble try the following workaround:
https://docs.oracle.com/cd/E24329_01/web.1211/e24376/rmidriver.htm#JDBCP350
Might be helpful.

Variable "inputVariable" does not have a part named "payload"

I am trying to deploy a composite I created in JDeveloper 12.1.3.0.0 to Weblogic 12.1.3.0.0. When I deploy from JDeveloper I get the following message on deployment.
[01:17:00 PM] Error deploying archive sca_MX_StormCreateUpdatePlantAcctWO_ABCS_req_rev1.0.jar to partition "WorkOrderServices" on server WLS_SOA1 [https://myip:8002]
[01:17:00 PM] HTTP error code returned [500]
[01:17:00 PM] Error message from server:
There was an error deploying the composite on WLS_SOA1: Deployment Failed: Error occurred during deployment of component: MX_StormCreateUpdatePlantAcctWO_ABCS_req to service engine: implementation.bpel, for composite: MX_StormCreateUpdatePlantAcctWO_ABCS_req: ORABPEL-05215
Error while loading process.
The process domain is encountering the following errors while loading the process "MX_StormCreateUpdatePlantAcctWO_ABCS_req" (composite "WorkOrderServices/MX_StormCreateUpdatePlantAcctWO_ABCS_req!1.0*soa_7dc4d4f8-7df0-465a-9d11-e7c1d8cb9c2d"): Validation of BPEL2.0 process failed..
This error contained an exception thrown by the underlying process loader module.
Check the exception trace in the log (with logging level set to debug mode). If there is a patch installed on the server, verify that the bpelcClasspath domain property includes the patch classes.
.
[01:17:00 PM] Check server log for more details.
[01:17:00 PM] Error deploying archive sca_MX_StormCreateUpdatePlantAcctWO_ABCS_req_rev1.0.jar to partition "WorkOrderServices" on server WLS_SOA1 [https://myip:8002]
[01:17:00 PM] Deployment cancelled.
[01:17:00 PM] ---- Deployment incomplete ----.
[01:17:00 PM] Error deploying archive file:/WorkOrder_EBS/MX_StormCreateUpdatePlantAcctWO_ABCS_req/deploy/sca_MX_StormCreateUpdatePlantAcctWO_ABCS_req_rev1.0.jar
(oracle.tip.tools.ide.fabric.deploy.common.SOARemoteDeployer)
This composite compiles fine in JDeveloper. In the WLS_SOA1-diagnostic.log I am seeing these errors.
[2016-06-13T13:16:57.542-05:00] [WLS_SOA1] [ERROR] [] [oracle.soa.bpel.engine.compiler] [tid: [ACTIVE].ExecuteThread: '8' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: TX12238] [ecid: 921f7c10-6914-4003-96f8-df103a09a69a-0005c140,0] [APP: soa-infra] [DSID: 0000LLAykDqB1FELJ6U4Uf1NMlsk00007u] Validation of BPEL2.0 process failed.
[2016-06-13T13:16:57.542-05:00] [WLS_SOA1] [ERROR] [] [oracle.soa.bpel.engine.compiler] [tid: [ACTIVE].ExecuteThread: '8' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: TX12238] [ecid: 921f7c10-6914-4003-96f8-df103a09a69a-0005c140,0] [APP: soa-infra] [DSID: 0000LLAykDqB1FELJ6U4Uf1NMlsk00007u] BPEL/MX_StormCreateUpdatePlantAcctWO_ABCS_req.bpel:71 error "element" is set to "ns3:LogEvent" on this <bpel:variable> but it cannot be resolved (check value of "element", imports, WSDLs or XSDs)., Suggested Fix : Make sure that value "ns3:LogEvent" is resolvable (check imports, value of "element").
[2016-06-13T13:16:57.543-05:00] [WLS_SOA1] [ERROR] [] [oracle.soa.bpel.engine.compiler] [tid: [ACTIVE].ExecuteThread: '8' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: TX12238] [ecid: 921f7c10-6914-4003-96f8-df103a09a69a-0005c140,0] [APP: soa-infra] [DSID: 0000LLAykDqB1FELJ6U4Uf1NMlsk00007u] BPEL/MX_StormCreateUpdatePlantAcctWO_ABCS_req.bpel:81 error Variable "inputVariable" does not have a part named "payload" - check expression segment "$inputVariable.payload"
I have ran into similar ORABPEL-05215 errors before and resolved them by updating my MDS. I updated all the MDS files that this composite references. I have re-created the inputVariable to try to resolve this error message with no luck.
I was able to deploy after removing this file WorkOrderRouter_ep.wsdl and its reference in the composite.xml. After looking in the logs the WLS_SOA1-diagnostic.log had multiple entries for not being able to find XSD files that were not necessary to this composite. Turns out this WSDL was referencing them.

Upgrading from Spring 3.2.1 to 3.2.13 gives 404 on static resources

We'd like to upgrade our Spring dependency, but are having issues with resources not being found by the server. No code-changes have been made, this works fine in 3.2.1.
We register the handler like this
#Override
public void addResourceHandlers(final ResourceHandlerRegistry registry) {
registry.addResourceHandler("/kjernejournal.html").addResourceLocations("/kjernejournal.html").setCachePeriod(0);
}
Log has
o.s.w.s.h.SimpleUrlHandlerMapping - Mapped URL path [/kjernejournal.html] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
But this fails later on, with the following error.
12:07:04.520 [[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'] DEBUG o.s.w.s.h.SimpleUrlHandlerMapping - Mapping [/kjernejournal.html] to HandlerExecutionChain with handler [org.springframework.web.servlet.resource.ResourceHttpRequestHandler#75288586] and 1 interceptor
12:07:04.520 [[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'] DEBUG o.s.web.servlet.DispatcherServlet - Last-Modified value for [/hpp-webapp/kjernejournal.html] is: -1
12:07:04.520 [[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'] DEBUG o.s.w.s.r.ResourceHttpRequestHandler - Trying relative path [/kjernejournal.html] against base location: ServletContext resource [/kjernejournal.html]
12:07:04.520 [[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'] DEBUG o.s.w.s.r.ResourceHttpRequestHandler - No matching resource found - returning 404
The file does exist in the root of the WAR-file.
Any idea on where to begin?
Figured out the problem.
When we register like
registry.addResourceHandler("/kjernejournal.html").addResourceLocations("/").setCachePeriod(0);
Instead of
registry.addResourceHandler("/kjernejournal.html").addResourceLocations("/kjernejournal.html").setCachePeriod(0);
It works fine. So the problem seems to be that resourceLocations pointed to a file instead of a directory. From ResourceHandlerRegistration JavaDoc:
Add one or more resource locations from which to serve static content. Each location must point to a valid directory.
Weird that it worked before, though...

Jersey Library errors (NoSuchMethod then IncompatibleClassChangeError)

We just upgraded from Weblogic 10 to Weblogic 12 and started to get this error
<Error> <com.sun.jersey.spi.container.ContainerResponse> <hostname> <nodename> <[ACTIVE] ExecuteThread: '21' for queue: 'weblogic.kernel.Default (self-tuning)'> <ws_user> <> <> <140123234234> <BEA-000000> <The exception contained within MappableContainerException could not be mapped to a response, re-throwing to the HTTP container
java.lang.NoSuchMethodError: com.sun.jersey.client.apache.ApacheHttpClientHandler.getRequestEntityWriter(Lcom/sun/jersey/api/client/ClientRequest;)Lcom/sun/jersey/api/client/TerminatingClientHandler$RequestEntityWriter
After little bit digging, I realized that Jersey library (com.sun.jersey.contribs) needs to be upgraded to 1.18.1 version from 1.2. I did that change and then started to get following error
weblogic.application.ModuleException: java.lang.IncompatibleClassChangeError: com.sun.jersey.json.impl.provider.entity.JSONRootElementProvider and com.sun.jersey.json.impl.provider.entity.JSONRootElementProvider$Wadl disagree on InnerClasses attribute
a little digging in it i learned that my JSR311-api (javax.ws.rs) has to be 1.1.1 and it is already that. Now i am lost what else shall i change to have these errors fixed
I had a similar issue when updating the Jersey library. In the end it turned out that the old jar was still in the /lib folder. Make sure that you have completely removed the previous version.
Hope that helps.

Resources