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
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment