Message Boards

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
How to generate the examples?
Answer
11/18/13 10:16 AM
Hi there,

huh.. while Im struggling with the BeanLocator error (see my previous post) I'd like to generate some of your example. But I can't find any documentation how to do so.
The only thing I can do is to call create.bat, which generates its own xml example definition. Exchanging the contents with an example xml file does not work, because the build.xml is naturally not correct.

Im missing something like that: "create.bat XMLPFExample06.xml", which generates the build.xml.

BTW: The provided war file in the examples doesn't run under Liferay 6.1.2-ce-ga3. Lots of spring errors.

Thank you,
Martin

RE: How to generate the examples?
Answer
11/18/13 10:41 AM as a reply to Martin Dames.
  Hola Martin,

      You can execute XMLPortletFactory in desktop mode, so you will only have to tell were to generate the portlet and were the xml definition is. Find a small video tutorial here:   http://www.xmlportletfactory.org/video-tutorials

 
      For sample xml definitions see : http://www.xmlportletfactory.org/examples  each sample has its own xml file definition.

      Be aware of versions, we haven't yet for Liferay 6.2 so don't use java 7

   Saludos, Jack.

RE: How to generate the examples?
Answer
11/18/13 12:14 PM as a reply to Jack A. Rider.
Hi Jack,

thank you. I missed the information about the desktop mode.

I switched completely from JDK7 to JDK6 and I can not compile the examples. I tried the Integer and the complex school courses example. The steps were:
  1. Download the xml definition file
  2. call the XMLPortletFactory.jar in desktop mode
  3. choose the downloaded xml definition file
  4. go to my SDK's portlet order
  5. type ant
Result:
 1...
 2    ----------
 3    1302. ERROR in C:\IDE\liferay-plugins-sdk-6.1.1\portlets\coursesExam
 4ple-portlet\docroot\WEB-INF\src\org\xmlportletfactory\school\coursesexample\util
 5\TeachersUtil.java (at line 21)
 6         import org.xmlportletfactory.school.coursesexample.service.Teach
 7ersLocalServiceUtil;
 8                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 9^^^^^^^^^^^^^^^^^^^
10    The import org.xmlportletfactory.school.coursesexample.service.Teach
11ersLocalServiceUtil cannot be resolved
12    ----------
13    1302 problems (1302 errors)
14
15BUILD FAILED
16C:\IDE\liferay-plugins-sdk-6.1.1\build-common-plugin.xml:690: The following erro
17r occurred while executing this line:
18C:\IDE\liferay-plugins-sdk-6.1.1\build-common.xml:121: Compile failed; see the c
19ompiler error output for details.
20
21Total time: 16 seconds


Same in Eclipse (import from PluiginSDK)...
The XMLPortlet_resources.zip was unzipped before in my XMLPortletFactory directory.

When I use the command line with create example “Here is an example”, and call ant in the generated directory I get a project, which can be compiled. Unfortunately this portlet does not work because of the ERROR: BeanLocator is null for servlet context example

So Im really stuck in developing with XMLPF...

Thank you!

RE: How to generate the examples?
Answer
11/18/13 12:53 PM as a reply to Martin Dames.
  Hola Martin,

      Did you remember to do de "ant build-services" before? seems services are not there.

  Saludos, Jack.

RE: How to generate the examples?
Answer
11/18/13 1:48 PM as a reply to Jack A. Rider.
Hi Jack,

ok, thank you. Now the portlet compiles.. and throws the beloved ERROR: BeanLocator is null for servlet context example. Don't know whats going on with this... well, Im missing a Wiki page for this... if you like, I will create one with a step by step tutorial.

Thanks,
Martin.

RE: How to generate the examples?
Answer
11/18/13 9:36 PM as a reply to Martin Dames.
Hi James,

We will try to reproduce the issue and give you feedback the next week.

Stay tuned!

RE: How to generate the examples?
Answer
1/3/14 9:09 AM as a reply to Juan G..
Hello, 

is anything happening here ?

I have the same: "ERROR: BeanLocator is null for servlet context example" issue while using example, or any other portlet generater by XMLPF

Buliding services is working just fine, I am able to import project to eclipse and rebuild it, but the error is still there. 

I am using liferay 6.2 CE GA1 can it be the issue ?

RE: How to generate the examples?
Answer
1/3/14 9:11 AM as a reply to Tomasz.
Tomasz:
Hello, 

is anything happening here ?

I have the same: "ERROR: BeanLocator is null for servlet context example" issue while using example, or any other portlet generater by XMLPF

Buliding services is working just fine, I am able to import project to eclipse and rebuild it, but the error is still there. 

I am using liferay 6.2 CE GA1 can it be the issue ?

Hi Tomasz,

sorry but 6.2 version isn't compatible yet with XMLPortletFactory. We are working on it.

Thanks!

RE: How to generate the examples?
Answer
1/3/14 11:57 AM as a reply to Juan G..
Hi, 

thanks, do you think it's rather matter of days, weeks, months ?

I have seen it recognized my liferay 6.2 SDK, so I supposed it was working. The generated code looked fine as well (some lines in Asset integration needed to be fixed) Everything was fine until placing portlets on pages

RE: How to generate the examples?
Answer
1/9/14 6:18 AM as a reply to Tomasz.
Hi Tomasz,

nice to hear, that Im not the only one with the BeanLocator error. I have it on Liferay 6.1.2 and stucked with XMLPortletFactory...

Hopefully the guys can fix it soon.

RE: How to generate the examples?
Answer
1/19/14 5:13 PM as a reply to Tomasz.
Hi Tomasz,

thanks very very much for your interest.

We are now working in 6.2 integration, so it should be a matter of few weeks only.

Thanks again for your patience.

RE: How to generate the examples?
Answer
1/19/14 5:14 PM as a reply to Martin Dames.
Hi Martin,

that issue is now solved. Please check the ZIP I uploaded in the other forum post you opened.

Thanks!

RE: How to generate the examples?
Answer
3/11/14 7:27 AM as a reply to Jack A. Rider.
Hi,

as an additional information you can call XMLPortletFactory.jar from the command line with the following arguments. This can be helpful, if you want to start XMLPF from a skript and can't use the desktop mode.

Argument 1: the XMLPF xml definition file
Argument 2: The portlets plugin directory
Argument 3: The Liferay SDK version. Possible values right now: 6.0.x | 6.1.x | 6.2.x

Example:
change to XMLPortletFactory Directory (within plugin directory)
"C:\Program Files\Java\jdk1.6.0_45\bin"\java.exe  -jar XMLPortletFactory.jar C:\somewhere\xmlpfDefinition.xml C:\IDE\liferay-plugins-sdk-6.1.1\portlets 6.1.x

Note that XMLPortletFactory.jar must be called within the XMLPortletFactory directory, otherwise XMLPortletFactory.jar will not found dependend files.

Hope this helps someone.