Forums

Home » Liferay Portal » English » Liferay Legacy

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Neil Griffin
Missing classes in 4.2.0 portal-ejb.jar file?
December 11, 2006 8:41 PM
Answer

Neil Griffin

LIFERAY STAFF

Rank: Liferay Legend

Posts: 2137

Join Date: July 26, 2005

Recent Posts

I downloaded 4.2.0 (BTW, great stuff!) and began the upgrade process from 4.1.0, but found that the portal-ejb.jar file that ships with the binary distributions is missing some compiled classes?

Specifically, I have some code that does this:

1import com.liferay.portal.service.model.Company;
2import com.liferay.portal.service.persistence.CompanyUtil;
3
4public static void main(String[] args)
5{
6    Company company = CompanyUtil.addCompany("mycompany.com");
7}


And rather than compile the entire Liferay source tree, I always put portal-ejb.jar in the compile.classpath, and was able to compile my code.

But it looks like now, that certain classes like Company.class and UserServiceUtil.class are not found in the portal-ejb.jar file. Perhaps this is because they are "interface" classes, and possibly not neccessary to include in the JAR for the JRE? Hmm...

Anyways, just wondering if I'll have to start compiling the source tree in order to compile the above code.

Thanks in advance,

Neil
Mika Koivisto
RE: Missing classes in 4.2.0 portal-ejb.jar file?
December 12, 2006 9:35 AM
Answer

Mika Koivisto

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1501

Join Date: August 7, 2006

Recent Posts

Have you looked from portal-service.jar for those classes? I think the whole API of Liferay was separated from portal-ejb.jar to portal-service.jar so that those services could be used from external portlet.war's.
Neil Griffin
RE: Missing classes in 4.2.0 portal-ejb.jar file?
December 12, 2006 9:46 AM
Answer

Neil Griffin

LIFERAY STAFF

Rank: Liferay Legend

Posts: 2137

Join Date: July 26, 2005

Recent Posts

I found the portal-service.jar file in the tomcat-5.5.17\common\lib\ext folder. This looks like a new change made in 4.2.0.

Thank you Mika!!

Neil
Jorge Ferrer
RE: Missing classes in 4.2.0 portal-ejb.jar file?
December 12, 2006 10:07 AM
Answer

Jorge Ferrer

LIFERAY STAFF

Rank: Liferay Legend

Posts: 2757

Join Date: August 31, 2006

Recent Posts

Hi Neil,

It's great to here you like 4.2 emoticon

Reloated to liferay-service.jar, yes it's new and allows portlets to access the Liferay services from deployed portlet applications. It should be placed in the global classpath of the application server along with portal-kernel.jar and portlet.jar. You should also add it to your classpath when developing as it contains all the Model classes and service interfaces.

We are giving some final touches to a new version of the installation documents that will explain all of this.
Neil Griffin
RE: Missing classes in 4.2.0 portal-ejb.jar file?
December 12, 2006 10:19 AM
Answer

Neil Griffin

LIFERAY STAFF

Rank: Liferay Legend

Posts: 2137

Join Date: July 26, 2005

Recent Posts

Jorge,

Yes, 4.2 is terrific. Many of the new features (esp. JBPM, Servicemix ESB, AJAX Chat) are exactly where Triton (the company I work for) is going. The parallel rendering engine and AJAX improvements to the Classic theme are very slick. Great stuff indeed!

Also, I think you made a good move by putting the portal-service.jar in the common lib of the app server.

Thanks again,

Neil