Create and deploy with Eclipse Wizard
BEA Portal - part 1 of 2 - BEA Weblogic Portal 10.3, may 2010
This quick guide to successfully build & deploying a Portlet has following steps :
(install BEA Weblogic Portal)
use Eclipse wizard to create Portlet Hello World project
configure new BEA Portal Server domain
use Eclipse wizard to deploy Portlet on the BEA Portal Server
Install BEA Weblogic Portal - including Eclipse with all relevant plugins configured by default
Get BEA Portal server and select the latest Portal version.
Its about 1 GB in size. This software includes Eclipse IDE, Weblogic Server and Weblogic Portal.
In this case have been specificly used portal103_win32.zip
Optionally (if already having BEA Portal installed) you _might_ want
eclipse including all the necessary plugins. Then you might check out Oracle Enterprise Pack for Eclipse.
and consider to get oepe-galileo-all-in-one-18.104.22.168.0.201003170852-win32.zip.
But since this comes bundled with the BEA Portal, it's only required if you
want a version upgrade or something like that.
Installation of the BEA Portal is straightforward. Executing the binary. But
you probably need to select custom installation and remember to check box
fo including examples. People not selecting the custom installation have been
experincing some slight problems.
Proceed with Eclipse wizard to create Portlet Hello World project
In any case, after installing the BEA Portal bundle into %BEA_HOME%\wls1001, proceed to start :
There will be a standard sample BEA Server configured, but this will not
include the Portal libraries and will be unsuitable for Portlet deployment.
Proced in Eclipse to create first a Portal EAR Project, then Portal Web Project.
Using top menu, open File -> New -> Portal EAR Project.
Proced to enter name "PortletHelloWorldEAR" for the Portal EAR project.
The target runtime really doesn't matter until the point of deployment. The
default "sample domain" Oracle Webloic server v10.3 is not a portal server and
will not deploy this Portlet because of missing essential Portal libraries.
But don't worry about that. Just proceed with "Finish".
After creating the Portal EAR Project, there will be a build problem due
to lacking web project inside the Portal EAR project. Fixing that now.
Proceed to mouse-right-click on the "EarContent" part of the project and select
New -> Portal Web Project
Proced to enter name "PortletHelloWorldWeb" for the Portal Web Project.
Accept standard settings otherwise. Proceed with "Finish".
Notice how all parts of the project now is buildt without error(s).
Please notice that there are already a default "Hello World print statement int the
doView of the Portlet, so it is not necessary to add at the moment.
Proceed to create the Portlet. Mouse-right-click on the"WebContent"
part of the project, and select New -> Portlet
Proced to enter name "PortletHelloWeb" for the Portlet.
Proceed with "Next".
Select Portlet type "Java Portlet" (JSR176) for the Portlet.
Proceed with "Next".
Proceed to enter a standard title, definition and name for the Portlet.
Proceed with "Next". And subsequently proceed with "ok".
For this simple example it will not be necessary with supporting
files. Just proced with "Create".
The final status of the projects will be a created file
PortletHello.java created in the web project "PortletHelloWorldWeb".
Proceed to deploy on BEA Weblogic Portal
The default "sample domain" BEA Weblogic server is not a Portal server
with required libs for a Portlet. So it's necessary to create a new
domain with Portal abilities. This is done by the BEA domain configuration wizard,
which is started through the Eclipse workbench.
Proceed through the top menu Window -> Open perspective -> Other ->
Proceed to open the Portal Perspective
Proceed to create a new server through the top menu
with New -> Other -> Server
Choose to start wizard for creating new server instance. Select "Server" and proceed with "Next".
Currently the new portal Domain is not created, so we canot just
type in the path for the Portal server. So proceed to follow the link
Click here to launch Configuration Wizard to create a new domain.
This will bring up the BEA Weblogic domain configuration wizard (also
possible to start from command line.
Having started the BEA Weblogic domain config wizard, proceed to "Create a new Weblogic domain".
Having selected to "Create a new Weblogic domain", proceed to
include following products "Workshop for Weblogic 10.3" and
"Weblogic Portal". This will include the relevant libs for the portlet just created.
Having selected to create a domainwith support for
"Weblogic Portal", select administrator console login username and password.
Standard since early days have always been "weblogic" for everything.
Having entered new domain configuration details, it's time for
selecting the JVM runtime. Both options are equivalent ok, but here we'll
settle for the JRockit JVM. Select it. Proceed with "Next".
Having entered all necessary domain configuration information,
there is no need to waiste more time. Select "No" and proceed with "Next"
directly to domain creation.
Proceed to enter the name for the domain. Since Portal configuration
has been entered, a relevant name "myPortalDomain" is selected. Complete
the domain creation with the "Create" button at the bottom.
Takes a little while to create. No need to start the Admin server at the
current point in time - but we need to open it later to verify
successfull deployment. Leave the checkbox unchecked just for now.
Close the BEA Domain creation wizard with "Done".
Back in the "Eclipse New Server" wizard, proceed
with the button "Browse" to select the Portal server just created. Find its path
in the directory structure. Eclipse doesn't know that it's a Portal server and not a
regular standard server - but we know, and that's the only important.
Proceed with "Finish". There will now be two servers with same name
"Oracle Weblogic Server v10.3 at localhost" and "Oracle Weblogic Server v10.3 at localhost (2)".
But there are a difference. The last is really a Portal server. You might
wish to rename the server name in order to be able to differ later on. Right-click
on the second server name "Oracle Weblogic.. (2)" and select "rename".
Just adding "Portal in front of the name should be sufficient.
Proceed to start it before deploying. Right-click on server name ane select "start".
Wait until the server in "Started" state.
Proceed to deploy the Hello World portlet by right-clicking on the
HelloWorldEAR project and selecting Run as -> Run on Server Alt+Shift+X,R
Select the new Portal domain as deployment target. Complete the
process with the botton "Finish". After that you should see some deploynent
acticvity in the logs - and no problems displayed in the "Error" tabbing pane on the Eclipse side.
Next open the Weblogic Admin console throgh http://localhost:7001/console and login as
user : weblogic, password : weblogic.
The application gets deployed with warning :
####<14-04-2010 01:50:15 CEST> <Warning> <EJB> <noname> <AdminServer> <[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1271202615615> <BEA-010061> <The Message-Driven EJB: MessageBufferTopicBean is unable to connect to the JMS destination: weblogic.PortletHelloWorldEAR.WlwRuntimeAppScopedJMS#MSG_BUFFER_TOPIC. The Error was:
Can not get distribute destination information. The destination JNDI name is weblogic.PortletHelloWorldEAR.WlwRuntimeAppScopedJMS#MSG_BUFFER_TOPIC, the provider URL is null>
####<14-04-2010 01:50:15 CEST> <Warning> <EJB> <noname> <AdminServer> <[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1271202615616> <BEA-010061> <The Message-Driven EJB: MessageBufferBean is unable to connect to the JMS destination: weblogic.PortletHelloWorldEAR.WlwRuntimeAppScopedJMS#MSG_BUFFER_QUEUE. The Error was:
Can not get distribute destination information. The destination JNDI name is weblogic.PortletHelloWorldEAR.WlwRuntimeAppScopedJMS#MSG_BUFFER_QUEUE, the provider URL is null>
Buy according to :
CR376380 : http://download.oracle.com/docs/cd/E13155_01/wlp/docs103/relnotes/relnotes.html :
"A harmless warning is thrown by Message Driven Beans once during deployment in the WebLogic Portal Sample Application
The Message Driven Beans throw the following warnings when the deployer can't obtain distribute destination information:
Message-DrivenEJB: MessageBufferTopicBean is unable to connect to the JMS destination: weblogic.portalApp.WlwRuntimeAppScopedJMS#MSG_BUFFER_TOPIC.
The Error was:Can not get distribute destination information. The destination JNDI name is weblogic.portalApp.WlwRuntimeAppScopedJMS#MSG_BUFFER_TOPIC, the provider URL is null
This warning is thrown only once and can be safely ignored. "
It may actually have something to to with the weblogic-application.xml making a reference to the library weblogic-controls-10.0 and some MDBs from the jar file listening on specific
application-scoped queue and topic, which are not defined in the application. But anyhow, that's an entirely different story.
The rest of the log looks nice and the PortalHelloWorld application also shows nicely up in the administration console.
It is even possible to get immdiately through to the index.html in the PortletHelloWorldWeb part of the project, which contains some recognizable static text.
This concludes Portlet Hello World build and deployment from here.