WebLogic: Unrecognized Callback - java

After migrating my JAVA EE app. (Spring Web model-view-controller (MVC) framework) from Ant to Maven I am getting this message while starting my app by WebLogic Server Version: 12.1.2.0.0
Error 403--Forbidden
From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
10.4.4 403 Forbidden
The server understood the request, but is refusing to fulfill it. Authorization will not help and the request SHOULD NOT be repeated. If the request method was not HEAD and the server wishes to make public why the request has not been fulfilled, it SHOULD describe the reason for the refusal in the entity. This status code is commonly used when the server does not wish to reveal exactly why the request has been refused, or when no other response is applicable
I've extracted an ear that is working with the new ear that is not working and I don't see any differences. Only a folder (jsp_servlet) that is not present in the new ear
..\myApp\myAppWeb\WEB-INF\classes\jsp_servlet
I went to the console http://localhost:7001/console and login.
I invokeed the test page for the application using the console with the same result
/wls-cat/index.jsp (Classloader Analysis Tool on server myserver)
I see this error in the server logs
javax.security.auth.callback.UnsupportedCallbackException: Unrecognized Callback
at weblogic.management.mbeanservers.internal.JMXAuthenticator$JMXCallbackHandler.handle(JMXAuthenticator.java:135)
at com.bea.common.security.internal.service.CallbackHandlerWrapper.handle(CallbackHandlerWrapper.java:76)
at weblogic.security.service.internal.WLSJAASLoginServiceImpl$CallbackHandlerWrapper.handle(WLSJAASLoginServiceImpl.java:154)
at javax.security.auth.login.LoginContext$SecureCallbackHandler$1.run(LoginContext.java:947)
at javax.security.auth.login.LoginContext$SecureCallbackHandler$1.run(LoginContext.java:944)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.login.LoginContext$SecureCallbackHandler.handle(LoginContext.java:943)

If you didn't change anything except ant conf file to mvn pom, make sure you clean the project and build that one more time from mvn command. I will suggest to use gradle for migration, because mvn and ant are slightly different. In gradle you can combine the both functionalities.

Related

Deploy Spring Boot jar to Azure, and make Azure restart

I build a Spring Boot jar on Jenkins, and upload through FTP to Azure, but since the app is still running, and I get error below. What is the recommended way to handle this on azure? I assume I somehow should shut the server down before uploading the jar, and start it again after upload.
..........
FTP: Connecting from host [ip-172-20-20-20]
FTP: Connecting with configuration [Back-End-Azure-FTP] ...
FTP: Disconnecting configuration [Back-End-Azure-FTP] ...
ERROR: Exception when publishing, exception message [Could not write file. Server message: [550 The process cannot access the file because it is being used by another process.
]]
Build step 'Send build artifacts over FTP' changed build result to UNSTABLE
Notifying upstream projects of job completion
Finished: UNSTABLE
Thanks in advance
One way of implementing this can be using spring actuator. They are documented here . They have a lot of handy instrumentation API and shutdown is one of the ways. You can drop in a simple POM dependency and that should do it (also enable shutdown in application yaml)
Before you run your FTP part , you will have to execute a post call through cURL to stop it and then deploy the new version package.

Magnolia CMS with Spring MVC maven project publish

When I want to publish my newly created Page in author mode, I got the following error in a popup:
error detected: Not able to send the activation request [http://localhost:8080/magnoliaPublic/.magnolia/activation]: cannot retry due to server authentication, in streaming mode.
I runned the project with mvn jetty:run-war. The maven projects are based of the "Getting started with Blossom" magnolia tutorial.
Could it be because you have just single instance? Go to Configuration App, there in the tree to /server/activation/subscribers/<your subscriber>. Under subscriber, check the url it points to. Most likely it is invalid. If yes, you can just switch off the subscriber by setting its enabled value to false. That way you disable publishing completely.

Unable to connect to SOAP Service over SSL in JBoss EAP 6.2

Summary: I have an SAAJ Client that calls a remote Web Service over HTTPS. Both Client and Server authentication via certificates is required. I can successfully invoke the service when running a JUnit test in my IDE, but fail to connect when running in JBoss.
Keystore/Truststore Configuration Details: In both the IDE and JBoss, I'm setting the keystore and truststore via system properties: javax.net.ssl.keyStore, javax.net.ssl.keyStorePassword, javax.net.ssl.trustStore, javax.net.ssl.trustStorePassword
Logging Configuration: In JBoss, I've enabled SSL Debug logging via the system property: javax.net.debug=SSL. I've also enabled CXF logging via a logging.properties file.
JBoss SSL Logging Output Summary:
SSL logging shows no WARN or ERROR logs
SSL logging shows a session is established at the time of the call to the remote service
JBoss CXF Logging Output Summary:
CXF logging shows that the POST is sent to the service via Conduit null.http-conduit
CXF logging shows this conduit is "configured for plain http", has "No Trust Decider", and has "No Auth Supplier" (I'm not entirely sure what all of this means, but it sounds relevant)
Stack Trace: Here's the actual stack trace I'm getting
Caused by: javax.xml.soap.SOAPException: JBWS024004: SOAP message could not be sent
at org.jboss.wsf.stack.cxf.saaj.SOAPConnectionImpl.call(SOAPConnectionImpl.java:124)
at my.client.soap.MySAAJClient.invoke(MySAAJClient.java:37) [my-client-0.0.1-SNAPSHOT.jar:]
... 17 more
Caused by: org.apache.cxf.transport.http.HTTPException: HTTP response '403: Forbidden' when communicating with https://remote.service.url.here/
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1542)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1502)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1309)
at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:627)
at org.jboss.wsf.stack.cxf.saaj.SOAPConnectionImpl.call(SOAPConnectionImpl.java:120)
... 19 more
Other Information
I don't have direct access to the logs of the remote web service, but I'm told that they "don't show anything"
CXF comes into play because it is used by JBoss. I don't have any CXF dependencies included in my project and it's not in play when I run the code in my IDE.
What I've Tried: I've been focused on CXF because again, this all runs fine when executed in my IDE where CXF is not in play and the CXF log that says the conduit has been "configured for plain http" scares me. I've tried including a jboss-cxf.xml, jbossws-cxf.xml, or cxf.xml configuration file in my WAR that includes the keystore and truststore configuration. This has not worked and I can't even tell that CXF is seeing these files.
My Questions (Updated)
Is there any way to get JBoss/CXF to see that this is a secure connection and use the keystore/truststore configured via system properties?
Is there any way for me to direct JBoss (via jboss-deployment-structur.xml maybe?) to use a different SAAJ implementation for my deployment?
Do you have any thoughts on other things I should be looking into?
Update 1
I believe I've confirmed that the JBoss-CXF integration is the issue. I was able to remove JBoss's SOAPConnectionImpl by modifying the file {JBOSS_HOME}/modules/system/layers/base/org/jboss/ws/saaj-impl/main/module.xml. I commented out the module dependency <module name="org.jboss.ws.jaxws-client" services="import"/>.
After making this change, my application was able to connect to the remote service with no issues.
Although this shows that the JBoss-CXF integration is this issue, I can't modify the deployment environment in this way. I need to identify another solution.
I'd go for system properties (or at least knowing the configuration of the system) as they might override whatever you specify in your deployment.
What version of cxf is used on the deployment environment? Do you have any info on the configuration of cxf on your deployment environment? From the documentation (http://cxf.apache.org/docs/ws-security.html), I can see you need to configure WSS4J interceptors for cxf 2.0.x or earlier, so you could check if this is okay on your deployment environment.

Deploying a Jax-WS application locally - HTTP Status 404

I have setup a local server running in eclipse. It is to run my max-ws application which I have been making.
Once the server has started i can proceed to the following directory to view the management console;
> http://localhost:8080/
The name of my war file is hotornotserver.war - so assuming i deploy the war in the management console i should then be able to proceed to the following directory to view the wsdl.
> http://localhost:8080/hotornotserver?wsdl
As it stands when i do this i get the following error;
HTTP Status 404 - /hotornotserver
type Status report
message /hotornotserver
description The requested resource (/hotornotserver) is not available.
JBoss Web/7.0.1.Final
Baically i am interested in finding out how I can call methods on my local web service to perform some analysis on metrics / performance however I keep getting the error above. Some help would be much appreciated.
Thanks

How to debug war dependency?

I am working on a web-app front end (spring mvc) which depends on war file (created also by me).
Both module web and core communicate via REST (Jersey).
Both modules are separate maven projects.
On some occasions during development I screw up something in the core and exception is thrown. Many times I need to setup a breakpoint there and trap the issue.
The problem is: I start the debug when running the web-app fine. But will never stop on any breakpoint in core (doooh). (core is build using maven package command, to generate war file).
I could start only the core and debug it. Problem some complex functions expect many attributes (form object json format).
Any ideas?
Tnx
Start the core on debug mode, if you can do this in your IDE then you are all set, otherwise you can set up your IDE for remote debugging, There are instructions to do this for popular Ide's. Set up for eclipse, Set up for Intellij
You can debug the core and start web-app regularly and make it send the request you want to debug on the core side.
Have the core source code open in your IDE. Configure it for remote debug of the JVM that the servlet container/app server is running the app. Enable remote debugging on the servlet container/app server. Start the server, start the remote debugging in the IDE. Set a break point and enjoy.

Categories

Resources