glassfish server serving xml instead of adf webpage - oracle

I am running a glassfish 3.1.2 server with ADF essential libraries added to it. The server runs fines, deploys all my applications without any errors but serves up xml code instead of web pages. I have to say that the rich client faces demo runs fine. So there must be something wrong with my applications' EARs. I have tried taking the RCF demo's libraries to manually package them in my war inside my ear without success.
Does anyone have an idea of what could be wrong?
I have a unmodified straightforward glassfish 3.1.2 downloaded from Oracle and configured as per Oracle's instructions to run ADF applications (hence the demo works), adf essentials downloaded from Oracle as well. Versions of adf essentials match the version of jdeveloper (12.1.2) Here is the document declaration from the outputed xml code:
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE html>
<f:view xmlns:f="http://java.sun.com/jsf/core" xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
xmlns:dvt="http://xmlns.oracle.com/dss/adf/faces">
I tried adding different libraries to the application deployment settings to no avail. I have tried none-to-all of them without success. (this took a long time to try)
Do you have any suggestions for me to check in order for the glassfish server to serve webpages instead of brute xml?
Best regards
Marc.

I stumbled across the answer:
I needed to add /faces in front of the webpage. Thus the url looks like
http://is-marca-v:9090/HRSystem-ViewController-context-root/faces/DeptEmpPage.jsf
and not
http://is-marca-v:9090/HRSystem-ViewController-context-root/DeptEmpPage.jsf
Have a nice day to you all.

Related

How to turn off standalone mode for Oracle ORDS

I have two servers. They are supposed to be identical. I also enabled the RESTful services on both servers. On one of the server, It gave me a 503 status error code saying the password for apex_pu is invalid, expired or account is locked when I tried to use the sample API in oracle.example.hr.
https://hostname/ords/Schema Alias/hr/
However, the same sample API works fine on my other server.
I checked the apex_pu.xml file in conf folder under product folder and compared the two apex_pu.xml on both server. I found that the apex_pu.xml file on the failed one is missing standalone = "no". I installed standalone mode before to look into some issues related to Oracle RESTful services. Then I left it like that ever since. I'm not sure if this is related to the issue that I'm currently encountering, but I'm trying to eliminate this difference by reverting it back to ORDS on Apache. I think this is the first step to troubleshoot my issue. Can anyone tell me how to revert this?
Commands that I used to enable standalone mode:
Java –jar ords.war configdir
Java –jar ords.war (to start standalone oracle)
Java –jar ords.war standalone (to start standalone oracle rest api)
failed one:
<?xml version="1.0" encoding="UTF-8"?>
normal one:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>

spring-mvc-404 page not found error in maven project

I have been trying to understand and clone the spring mvc login and registration process. As far as I know I am following the same code and process. Only thing I have changed is database details.0 Which works fine I am able to insert the data into the MySQL (8.0.27) database using test file. I am getting the same error even when I am trying his code I am getting error.
here is my code: https://drive.google.com/drive/folders/1JNkZp_O1Lh0y_1NdZ-A85KI1gfgy0_Em?usp=sharing
here is GitHub code: https://github.com/javabyranjith/spring-framework-mvc/tree/master/springmvc-userlogin
Errors I am getting:
action keyword in form was giving error "element loginProcess is not found"-> so I changed it to the form action then it worked
The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.
my questions are
can a different version of Apache Tomcat(10.0.13) server can cause the issue?
since I am using new Eclipse so I have updated the new libraries can this cause the issues?
Please suggest the changes so that I can run this project. Suggest the changes here or directly change it in the google drive folder.
Tomcat 10 does not work with Spring 5. Downgrade to Tomcat 9.
10th has jakarta packages renamed from javax, which spring 5 does not support.
Friendly advice, if you are using code from git, they left versions of stuff like java and tomcat for a reason, and the newest versions like Tomcat 10 and JDK17 went through a lot of changes, so always try with suggested versions and try to migrate them to higher ones. Except for Tomcat 10, you will have to wait for Spring 6 for that.
As for the new eclipse, it does not make any difference, the maven project is still the maven project, src, and pom.xml, the structure remained the same.
First try with suggested versions then you can ramp them up once you are sure that it is working.

JDeveloper 11.1.1.6 weblogic startup issue

I created an simple skeletal web application. I created only a simple blank JSF page. Right click and run. Then I got the following message in the Log console.
The Server Instance cannot be started because the Integrated Weblogic domain was not built successfully.
Can anybody suggest me why I am getting this error?
Your question does not provide detailed information.
The best way would be to go to weblogic domain options from start menu and create a new domain.
Then link that domain in jdeveloper and use the same. Delete the integrated domain i.e. base_domain folder.
There were 2 ways this problem can be fixed:
Try starting and fixing any issues with the Integrated weblogic domain. Till that is not starting successfully, JDeveloper cannot do anything on that. For me one time startup of the current domain outside of the Jdeveloper solved the issue. After that it was working fine from JDeveloper too.
Another option is as stated by vijayinani above to create a new domain and link it. But, beware your integrated base_domain is not having anything which you need to preserve if you plan to delete that.

In Weblogic 10.3.5, is there any way to expire an html file from cache without going through a server restart

In Weblogic 10.3.5, is there any way to expire an html file from cache without going through a server restart. I am supporting a server with frequent HTML changes and hoping to find a way not to restart the server each time the HTML is updated. Environment is supporting a PeopleSoft domain. Thanks.
There's a way indeed, the parameter "Resource Reload Check (in seconds)" which can be found on a web app setup is what you're looking for. I've setup this to 5(secondes) in order to have a periodic refresh on dynamic ressources generated by an application engine (an xml parsed by an xslt)
For some details here's doc of 12.1.2 but I confirm it exists also on 10.3.4 (so on your version too) : https://docs.oracle.com/middleware/1212/wls/WLACH/pagehelp/J2EEwebappwebappconfigurationtitle.html

A good strategy for knowing the versions of deployed applications?

In order to know which revision number the application is built from, we use to give the ears we deploy to Glassfish names like myapp_2012-01-20_rev22123.ear. Then we can simply login to Glassfish and see what version is deployed in the web interface (as the appname is the name of the ear file). A downside of this approach is that we need to do a manual undeploy/redeploy to update the name...
But I would like to script the undeploy/deploy process, and having each version of an ear get a different name is not very suitable to scripting this redeployment process. Glassfish 2 does not support the "list applications" goal that Glassfish 3 has, which I could have used to retrieve the application name to undeploy.
So is there any good strategy that will easily allow us to see what version is deployed of an application, and that does not suffer from the above fault?
It would be preferable if this meant we did not have to change the existing applications (like add a jsp page or something to show the current scm revision), but a change in a Maven build script would be acceptable.
I faced a similar issue, I finally came around it by using maven-buildnumber-plugin and writing a simple servlet to get build information. You can find the details in the blog post I made.
Why not use the built-in GlassFish Server versioning to assign a version number at deploy time? This will also enable you to rollback to prior versions. For example:
asadmin deploy --name MyApplication:2012-01-20_rev22123 MyApplication.ear
There is more information on application versioning here:
http://docs.oracle.com/cd/E18930_01/html/821-2417/gihzx.html#gkhhv
Hope this helps.

Resources