Cannot find OpenPortal Portlet Container 2.x when creating a new server runtime environment in eclipse - eclipse

I just started learning portlet and got stuck in the first place. I have installed JavaEE 6 SDK, Eclipse Helios and GlassFish Server 3.0.1. I also successfully configured OpenPortal Portlet Container (OPC) for GlassFish by running command:
java -jar portlet-container-configurator.jar
The problem come up when I wanted to create a new server runtime environment of OPC, there was no "OpenPortal Portlet Container 2.x" node like the tutorial said. I googled and found that I needed to install Eclipse Portal Pack but the link was dead.
Any suggestion, please?
Best Regard.

If you want to develop portlets, I strongly recommend downloading Apache Pluto instead of using the open portlet container; you can download a version of Tomcat bundled with Pluto from their site: http://portals.apache.org/pluto
Actually, Pluto has a few quirks that you need to get past (for example, it wants you to run an 'assembly' step to add some entries to your web.xml) but once you do it is probably the best way. You could also try Liferay or JBoss' GateIn for development, but if you are ultimately targeting a vendor supplied platform like WebSphere, you might find that these actually have features that aren't as portable, whereas Pluto is really just a simple implementation of the portlet spec.

I have found the .jar file on Internet. Thanks for watching.

Related

ClassNotFoundException:com.microsoft.sqlserver.jdbc.SQLServerDriver after migration to liferay 7 from liferay 6.2

I get below error in console when deploying each portlet after migration to liferay 7 which was working fine with liferay 6.2
ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver cannot be found by MAIPF_MyAccount-portlet_7.0.0.1
SQLException: No suitable driver found for jdbc:jtds:sqlserver://IDPLaptop/MAIPF2012_dev_VR7
My guess is that you fell into a common issue I keep seeing on StackOverflow when people try to upgrade to Liferay 7: libraries within the server's lib are not visible for all portlets.
With the ability to code OSGi modules,if one moves their portlet to an OSGi bundle, they need to keep track of the dependencies that module require.
As the jar you are using is not a bundle, you will need to create a uber bundle or use compileInclude to create a fat jar for your module.
Liferay 7, out of the box, does only support open source databases. As you state that you're using Service Builder, you might need to install Antonio's SQLServer integration or move to the commercial offering, Liferay DXP.
Check Victor's answer as well. I commonly use open source databases and DXP anyways, so the nitty-gritty-details that are hidden here are only my theoretical knowledge, I rarely get to experience this in practice.

How to run/debug java web service project in eclipse

I have a Java Web Service project which was just handed over to me by a colleague who just resigned (no one is assisting me in my new company). Im new to Java (J2EE) and my background is .Net + frontend + azure so I am pretty much very confused with setting up and running the java project. Also, Since my background is .Net Im referencing everything with how things work in Visual Studio from running a project, setting up a project to setting up and debugging a WCF project which I realized now is very different from eclipse + java.
I would really appreciate if someone could explain to me how I can run this project which is supposedly a java web service (as I was told)?
First I have a project that is like this:
Im assuming that the project boxed as blue is the webservice (and the rest are just libraries)? Is this correct? if so how do I run and debug the project using eclipse
Second when I click on debug as -> debug on server this is all I see:
Another colleague told me to install JBOSS (I haven't installed a server in eclipse) because that is what they used. Is there good documentation (step-by-step guide) on how to install JBOSS to run in eclipse. Im assuming that JBOSS + eclipse is like IIS express + Visual studio. Are there also other alternatives to JBOSS + eclipse like perhaps tomcat + ecplise that I can configure.
I really really find it hard to setup the java web service project in eclipse I have little to no prior experience with java j2ee programming especially with web services so any clarifications with my questions would be much appreciated. To sum up:
How would I really know that the project is a java webservice?
If so, how do I run the project and host the project using debugging in eclipse with tomcat or jboss?
I would appreciate if anyone can point me to the right direction of figuring out the source code
From here we can only guide you, you will have to go through some tutorials to understand how java projects work.
Your project is a webservice project according to your web.xml file because its having context params for rest.
the context param sets a front url to your webservice which in this case is gametime.
Check these tutorials and you will understand how it works
http://www.mkyong.com/tutorials/jax-rs-tutorials/
Create simple examples given in the above tutorial and then you can execute your's program
Jboss is a application server which we use to run our app.
You can install jboss in eclipse or you can use it externally also.
To install eclipse and jboss you can follow the link
http://theopentutorials.com/tutorials/java-ee/installing-jboss-tools-in-eclipse/
The other option is to download eclipse and jboss seperately
and use them.
Go to jbosshome/bin
If you download both of them seperately
then in that case for jboss
Invoke the add-user.sh or add-user.bat script. ...
Choose to add a Management user. ...
Choose the realm for the user. ...
Enter the desired username and password. ...
Choose whether the user represents a remote JBoss Enterprise Application Platform 6 server instance. ...
Enter additional users. ...
Create users non-interactively.
After this go to eclipse and follow steps of below link to add jboss to eclipse
http://www.mastertheboss.com/eclipse/jboss-eclipse/jboss-and-eclipse
A Java web application among other things has a predefined directory structure including folders named WEB-INF, WEB-CONTENT etc.
On how to deploy a web application to Tomcat via Eclipse you can follow the steps in this tutorial.

How to deploy a Glassfish application on CloudBees

I'm trying to deploy my Web application running on Glassfish on Cloudbees.
Unfortunately I didn't find any documentation or tutorial.
I'll be very thankful if anybody can explain me the best way to do this. I'm lost...
Thank you!
(PS: I'm working on Netbeans)
To deploy, you need to right-click on the project in the NetBeans project list and click "Deploy". Obviously you need to ensure that the properties for the project are pointing to the correct deployment location and directory.
To get a glassfish container at runtime you'll need to setup your application to run he related clickstack. You'll need the CloudBees SDK installed, and run this command :
bees app:deploy -a DOMAIN/APP_ID -t glassfish3 hello.war
Another option is to use cloudbees clickstart (see clickstart icon top left on cloudbees web toolbar) and select the glassfish one. Then commit your own code in the generated application skeleton, or change the generated jenkins job to point to your existing SCM
Please note this container is a community work in progress, doesn't provide all the features you can have on the tomcat6 or jboss7 runtimes. If your application isn't container dependent, those ones may be a better option then.
My application is working, actually I had to create an application using JavaEE6 in configuration (it's a jboss server in reality).
I configured the persistence.xml and added a cloudbees-web.xml.
I also deleted some hibernate and mysql jar(s) and it has worked!
I hope that can help others cloudbees developers!

Liferay portlet development on JBoss AS 6

I am trying to create a new Portlet project (basically a portlet for Liferay) in Eclipse (Helios with Liferay SDK installed). I use JBoss AS 6.10.final and Liferay 6.05.
The problem is that everytime I try to create new portlet, it asks me for Runtime Enviroment. I want this enviroment to be JBoss AS, but Eclipse only suggests different Tomcat distributions. I dont have Tomcat bundle installed and I am not going to since it will run on JBoss AS.
Liferay is already installed on JBoss and running (when I start the JBoss AS, I can access the liferay portal page - it has all jars and wars on correct places in AS).
I havent found any tutorial how to make this work. Could someone perhaps provide some step by step guide or direct me to any existing one? Thank you!
PS: I hope that my question is not too confusing, if so, I will try to edit it and make myself clearer...
I have finally figured it out:
I changed the build.username.properties file
app.server.portal.dir=c:\\Programs\\jboss-6.1.0.Final-ESB-4.12\\server\\default\\deploy\\liferay-portal-6.0.5.war
app.server.lib.global.dir=c:\\Programs\\jboss-6.1.0.Final-ESB-4.12\\common\\lib
app.server.deploy.dir=c:\\Programs\\jboss-6.1.0.Final-ESB-4.12\\server\\default\\deploy
app.server.type=jboss
app.server.dir=c:\\Programs\\jboss-6.1.0.Final-ESB-4.12
so it points to the directory with liferay war files. Then I had to check in Eclipse that I do not want this file to be overwritten again and it works just fine. I can deploy all projects to JBoss using Liferay SDK!

Integrating JBOSS and Eclipse

I have JBOSS server. I used to make web applications using just notepad++. I used to create the necessary folders like web-inf and files like web.xml. For larger projects doing all this and manually compiling has become cumbersome. I want to use eclipse for that. I saw this tutorial - http://www.eclipse.org/webtools/community/tutorials/BuildJ2EEWebApp/BuildJ2EEWebApp.html . But I don't understand how to make a server. I already have a server. What I want to do is write JSPs and Servlets in eclipse and the build should automatically be deployed in jboss server.
How to to this?
Install JBoss Tools
After that follow the instructions from here to get started and deploy apps to JBoss Server.
To automatically deploy apps after the build you could use a build tool such as ANT or Maven.
I wrote a tutorial for this some time ago: Setting up web development environments with Eclipse
It shows how to setup JBoss within Eclipse (in addition, it also shows how to setup Tomcat and Weblogic), and also shows how to build a simple sample Servlet to verify the proper installation.
If you already use JBoss on the server side, then have a look at the client side as well: http://www.jboss.org/developer
(I haven't tried it myself, but...)
Just open eclipse then go to:
"Help-> Check For Updates" It will check for eclipse updates and installs new availables.
Now "Help -> Eclipse Market Place" Search for "Jboss tools" from search result select one(as your eclipse version) and install it. It will add adapter for new jboss versions.
Now add new server from server view select Jboss version then next add your Home directory of jboss. Then finish.
Step 1 is optional but it sometime it helps.