Thursday, 7 November 2013

Oracle Application Testing Suite. quick start

Using Open Script, create one or more  HTTP/Web scripts.
Using  Oracle Load Testing, make sure you choose the same repository as the previous one (path to your open script's script)
Add to Scenario
Enter the number of VUs you want to use for each script
Press the RUN TEST button
Make sure you stop the test

Saturday, 1 June 2013

JDeveloper and Webcenter Portal


Problem: When installing the Webcenter extension in JDeveloper, I keep having an error message: too many redirects.
Solution: I found out that a proxy is in place in JDeveloper, and no matter if I unchecked using the proxy, it is still being used. So I just put the wildcard * in the exceptions, and that fixed the problem.

Problem: All you have is a Portlet packaged in a war, and you want to deploy it in webcenter Portal:
Solution: convert the portlet's war into a WSRP application, use java -jar wsrp-predeploy.jar source EAR  target EAR. It also works for wars, so for example, here is what I executed:  java -jar C:\Oracle\Middleware2\jdeveloper\webcenter\modules\oracle.portlet.server_11.1.1\wsrp-predeploy.jar ch7_HelloWorldPortlet.war PortletEAR.ear. The output should be:
Running predeployment tool in default mode
Portlet application detected; attempting to create a WSRP Service
WSRP Service created successfully


You then deploy the ear into weblogic. I used the console. Click on the application you just deployed (in the weblogic console: deployments). You can find the settings of your application, and under Testing, you can get the URL that will have the URLS to the WSDL, for example, my url is: http://192.168.192.1:7101/ch7_HelloWorldPortlet/info. If you hit that URL with your browser, you will see links to the WSDL on the page, copy the URL to the WSDL in your clipboard.


In JDeveloper, create a new portal application (or use an existing one), create a new page (or use an existing one). Under Application Resources, create a connection to WSRP Producer and use the URL copied in your clipboard when asked by the connection wizard.

You should now be able to view your portlet in you page when you run it.

Problem: When I tried to use the portlet in my application in webcenter portal, I got this exception:

javax.servlet.ServletException: java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/Configjavax.portlet.PortletException: javax.servlet.ServletException: java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/Config

Solution: What I did what alter the classpath in the startup script of Integrated weblogic in JDeveloper:
C:\Users\myuser\AppData\Roaming\JDeveloper\system11.1.1.6.38.62.29\DefaultDomain\bin\startWebLogic.cmd

Added this line: set CLASSPATH=%CLASSPATH%;C:\Oracle\Middleware2\oracle_common\modules\jstl-1.2.jar.

There are better ways the fix this, but I was short in time, I didn't have time to investiguate further. Hopefully, I will get back with a better solution

Wednesday, 29 May 2013

Virtual Box VM

Problem: Can't resize the screen of the VM
Solution: Install VirtualBox Guest Additions

Problem: user oracle has no permission to access shared folder:
Solution: usermod -a -G vboxsf oracle (and restart Menu Machine ACPI shutdown)

Monday, 20 May 2013

Setting up a standalone machine with Webcenter Suite for development

If you manage to install:
  • Webcenter sites on a linux VM
  • Eclipse with csdt on your machine configured to connect remotely to your sites installation

You might want to change the default configuration on CAS to point to http://vm_ip:port/cs instead of http://localhost:port/cs, otherwise, if you invoke sites from the browser on your local machine, it will try to call http:/localhost:port/cas/login and it will fail because CAS would be running on the "remote" VM as well.

To change the configuration, you can try to find the file SSOConfig.xml, usually under /home/oracle/Oracle/Middleware/user_projects/domains/csDomain/servers/CS_Server/stage/CS/CS/WEB-INF/classes/, and change the property <property name="casUrl" value="http://localhost:port/cas" /> to <property name="casUrl" value="http://vm_ip:port/cas" />

List of useful links about Oracle Webcenter