You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by Mark Eggers <md...@gmail.com> on 2010/08/26 00:41:14 UTC

New user - some questions about the tutorial

Environment:
OS:         Fedora 13
Java:       Oracle/Sun jdk/jre 1.6.0_21 (32 bit)
Container:  Tomcat 6.0.18 (but see notes below)
IDE:        NetBeans 6.8 with Portal Pack 3.0.3
Build tool: Maven 2.2.1

I used NetBeans 6.8 (waiting until the Portal Pack gets ported to 6.9.1) 
to create the Maven project. This worked cleanly, creating the master 
project and two modules.

I added some custom goals to mimic jetspeed:mvn -Dtarget=<name>. Creating 
a Generic Portlet worked as expected (sans Override annotations - looks 
like a Portal Pack issue), and makes the appropriate portlet.xml 
modifications.

Some issues:

I did find the JIRA issue with page.security and fixed that in the 
project.

I also found that:

http://portals.apache.org/jetspeed-2/tutorial/02/default-page.html

seems to point to the wrong page to be modified. The page I had to modify 
to change the style was:

jetexpress-portal/src/main/webapp/WEB-INF/pages/folder.metadata

When doing multiple installs using the jetspeed:mvn -Dtarget=deploy-pa, 
jetspeed:mvn -Dtarget=deploy-portal, the $CATALINA_HOME/lib jars were 
copied (again). I'm not sure why this is necessary.

When running the build from the Maven artifact in Tomcat 6.0.18, I 
received the following error (277 lines, but I'm just posting the first 
few):

25.08.2010 14:24:40 ERROR
[org.apache.jetspeed.page.document.psml.CastorFileSystemDocumentHandler.unmarshallDocument
():570] Could not unmarshal the file /home/myhome/Apache/Jetspeed/apache-
tomcat-6.0.18/webapps/jetexpress/WEB-INF/pages/_template/new-user/default-
page.psml Illegal Text data found as child of: page value: " 
AboutJetspeed"{File: [not available]; line: 33; column: 8}

This is the end of the fragment describing the AboutJetspeed portlet in 
j2-admin. I didn't see anything obviously wrong, but then this is my 
first attempt using Jetspeed and portlets.

So:

1. Why does the Maven target copy over the $CATALINA/lib jars every time?
2. How can I fix the error message for the AboutJetspeed portlet?

Thanks much.

. . . just my two cents.

/mde/


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


Re: New user - some questions about the tutorial

Posted by Mark Eggers <md...@gmail.com>.
On Wed, Aug 25, 2010 at 10:59 PM, David Sean Taylor
<d....@onehippo.com> wrote:
> On Wed, Aug 25, 2010 at 3:41 PM, Mark Eggers <md...@gmail.com> wrote:
>> Environment:
>> OS:         Fedora 13
>> Java:       Oracle/Sun jdk/jre 1.6.0_21 (32 bit)
>> Container:  Tomcat 6.0.18 (but see notes below)
>> IDE:        NetBeans 6.8 with Portal Pack 3.0.3
>> Build tool: Maven 2.2.1
>>
>> I used NetBeans 6.8 (waiting until the Portal Pack gets ported to 6.9.1)
>> to create the Maven project. This worked cleanly, creating the master
>> project and two modules.
>>
>> I added some custom goals to mimic jetspeed:mvn -Dtarget=<name>. Creating
>> a Generic Portlet worked as expected (sans Override annotations - looks
>> like a Portal Pack issue), and makes the appropriate portlet.xml
>> modifications.
>>
>> Some issues:
>>
>> I did find the JIRA issue with page.security and fixed that in the
>> project.
>>
>> I also found that:
>>
>> http://portals.apache.org/jetspeed-2/tutorial/02/default-page.html
>>
>> seems to point to the wrong page to be modified. The page I had to modify
>> to change the style was:
>>
>> jetexpress-portal/src/main/webapp/WEB-INF/pages/folder.metadata
>>
>> When doing multiple installs using the jetspeed:mvn -Dtarget=deploy-pa,
>> jetspeed:mvn -Dtarget=deploy-portal, the $CATALINA_HOME/lib jars were
>> copied (again). I'm not sure why this is necessary.
>>
>> When running the build from the Maven artifact in Tomcat 6.0.18, I
>> received the following error (277 lines, but I'm just posting the first
>> few):
>>
>> 25.08.2010 14:24:40 ERROR
>> [org.apache.jetspeed.page.document.psml.CastorFileSystemDocumentHandler.unmarshallDocument
>> ():570] Could not unmarshal the file /home/myhome/Apache/Jetspeed/apache-
>> tomcat-6.0.18/webapps/jetexpress/WEB-INF/pages/_template/new-user/default-
>> page.psml Illegal Text data found as child of: page value: "
>> AboutJetspeed"{File: [not available]; line: 33; column: 8}
>>
>> This is the end of the fragment describing the AboutJetspeed portlet in
>> j2-admin. I didn't see anything obviously wrong, but then this is my
>> first attempt using Jetspeed and portlets.
>>
>> So:
>>
>> 1. Why does the Maven target copy over the $CATALINA/lib jars every time?
>
> Sounds like a bug... if you type:
>
> mvn jetspeed:mvn -Dlist
>
> you get a list of all commands and which subcommands are executed.
> Funny though, I don't see a deploy-portal command

My mvn jetspeed:mvn -Dlist output:

[mdeggers@phoenix jetexpress]$ mvn jetspeed:mvn -Dlist
[INFO] Scanning for projects...
[INFO] Reactor build order:
[INFO]   jetexpress portal project
[INFO]   jetexpress portal
[INFO]   jetexpress portlet application
[INFO] ------------------------------------------------------------------------
[INFO] Building jetexpress portal project
[INFO]    task-segment: [jetspeed:mvn] (aggregator-style)
[INFO] ------------------------------------------------------------------------
[INFO] [jetspeed:mvn {execution: default-cli}]

Available jetspeed:mvn targets:
  install-pa           [install-pa]
  install-portal       [install-portal]
  install              [install-portal, install-pa, install]
  db-portal            [install-portal, db-portal]
  deploy-pa            [install-pa, deploy-pa]
  db                   [install-portal, db-portal, db]
  deploy-portal        [install-portal, install-pa, install, deploy-portal]
  portal-seed          [install-portal, portal-seed]
  portal-seed-dbpsml   [install-portal, portal-seed-dbpsml]
  deploy-portal-dbpsml [install-portal, deploy-portal-dbpsml]
  all                  [install-portal, install-pa, install,
db-portal, db, deploy-portal, deploy-pa, all]

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2 seconds
[INFO] Finished at: Wed Aug 25 23:56:18 PDT 2010
[INFO] Final Memory: 6M/247M
[INFO] ------------------------------------------------------------------------

And I was following the instructions from here:

http://portals.apache.org/jetspeed-2/tutorial/03/tutorial-psml.html

In particular:

mvn jetspeed:mvn -Dtarget=deploy-pa
mvn jetspeed:mvn -Dtarget=deploy-portal

>> 2. How can I fix the error message for the AboutJetspeed portlet?

> I reviewed the file and it looks fine in the distribution. Sometimes
> when you edit files like these with an editor that doesn't support
> unicode (this particular file has Chinese and Korean localization),
> the encoding is broken by the editor

That could explain it. Previous versions of NetBeans did not have the
capability of marking individual files with different encodings. I
don't recall if NetBeans 6.8 does. I know Eclipse handles this. I'll
check the release notes. Meanwhile I can try running the artifact
again and copying the files over (without attempting to edit them).

>From time stamps on $CATALINA_HOME/lib. mvn jetspeed:mvn
-Dtarget=deploy-portal does indeed copy the jars. Would a target that
does install-pa, install-portal, deploy-pa, deploy-portal be of value
for incremental development? I don't know the particulars of the
targets though, since I just started exploring Jetspeed.

Thanks for the answers.

. . . . just my two cents.

/mde/

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


Re: New user - some questions about the tutorial

Posted by Mark Eggers <md...@gmail.com>.
On Thu, Aug 26, 2010 at 10:53 AM, David Sean Taylor
<d....@onehippo.com> wrote:
>  <title>Dashboard</title>
> AboutJetspeed
>  <fragment id="new-user-1000" type="layout"
> name="jetspeed-layouts::VelocityTwoColumns">
>    <fragment id="new-user-1011" type="portlet"
> name="j2-admin::JetspeedDeveloper">
>      <property name="row" value="0" />
>      <property name="column" value="0" />
>    </fragment>
>    <fragment id="new-user-1012" type="portlet" name="j2-admin::AboutJetspeed">
>      <property name="row" value="0" />
>      <property name="column" value="1" />
>    </fragment>
>   </fragment>
> </page>
>
> Notice how the "AboutJetspeed" text is not enclosed properly in an XML
> element? There lies the problem. Just remove the "AboutJetspeed" text
> and that should fix the problem. I'll get it checked in later today.

Thanks! That solved the problem. I don't know why I missed that. Now
everything builds and runs cleanly.

Well, I do have a stray derby.log file (probably expected since I'm
using the default embedded derby), and a velocity.log file (not
expected). I'll take a look at the velocity.properties file later and
see if it's passing logging over to log4j.

Thanks again.

. . . . just my two cents.

/mde/

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


Re: New user - some questions about the tutorial

Posted by David Sean Taylor <d....@onehippo.com>.
On Thu, Aug 26, 2010 at 10:38 AM, Mark Eggers <md...@gmail.com> wrote:
> On Wed, 25 Aug 2010 22:59:54 -0700, David Sean Taylor wrote:
>
>> I reviewed the file and it looks fine in the distribution. Sometimes
>> when you edit files like these with an editor that doesn't support
>> unicode (this particular file has Chinese and Korean localization), the
>> encoding is broken by the editor
>
> I went back and created everything via command line and did not edit any
> file. I also installed j2-admin to ~/.m2 from the distribution.
>
> My locale and encoding are:
>
> LANG=en_US.UTF-8
> GDM_LANG=en_US.UTF-8
> XTERM_LOCALE=en_US.UTF-8
>
> Files were copied using UTF-8 according to messages from the maven build.

You know what, looks like you are right. I incorrectly reviewed the
file found in the 2.2.1 distribution. After re-reading your email, I
realized you were talking about another file, located in the
jetexpress tutorial distribution, not the jetspeed distribution. I
brought that file up in my editor and immediately saw something
suspicious:


  <title>Dashboard</title>
AboutJetspeed
  <fragment id="new-user-1000" type="layout"
name="jetspeed-layouts::VelocityTwoColumns">
    <fragment id="new-user-1011" type="portlet"
name="j2-admin::JetspeedDeveloper">
      <property name="row" value="0" />
      <property name="column" value="0" />
    </fragment>
    <fragment id="new-user-1012" type="portlet" name="j2-admin::AboutJetspeed">
      <property name="row" value="0" />
      <property name="column" value="1" />
    </fragment>
   </fragment>
</page>

Notice how the "AboutJetspeed" text is not enclosed properly in an XML
element? There lies the problem. Just remove the "AboutJetspeed" text
and that should fix the problem. I'll get it checked in later today.

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


Re: New user - some questions about the tutorial

Posted by Mark Eggers <md...@gmail.com>.
On Wed, 25 Aug 2010 22:59:54 -0700, David Sean Taylor wrote:

> I reviewed the file and it looks fine in the distribution. Sometimes
> when you edit files like these with an editor that doesn't support
> unicode (this particular file has Chinese and Korean localization), the
> encoding is broken by the editor

I went back and created everything via command line and did not edit any 
file. I also installed j2-admin to ~/.m2 from the distribution.

My locale and encoding are:

LANG=en_US.UTF-8
GDM_LANG=en_US.UTF-8
XTERM_LOCALE=en_US.UTF-8

Files were copied using UTF-8 according to messages from the maven build.

I even tried adding -Dfile.encoding=UTF-8 in JAVA_OPTS of
$CATALINA_HOME/bin/setenv.sh.

I still get the same error. I realize it's not a show-stopper, but it is 
annoying (especially if I work on internationalization at some point).

Projects are encoded UTF-8 by default in NetBeans 6.8. While I have the 
option to change the default encoding of the source files per project in 
NetBeans 6.8, the IDE does not seem to recognize any sources outside of
[artifact-id]/src/main/java for maven projects. I'll see if there is a 
way to change that to include resources (ie., to include the webapp 
subdirectory). However, since my locale is UTF-8, I'm not sure what this 
will accomplish.

As an aside, I could open up the files in Emacs and see the characters 
(since I have the fonts installed on this system).

Any thoughts would be appreciated. Thanks much.

. . . just my two cents.

/mde/


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


Re: New user - some questions about the tutorial

Posted by David Sean Taylor <d....@onehippo.com>.
On Wed, Aug 25, 2010 at 3:41 PM, Mark Eggers <md...@gmail.com> wrote:
> Environment:
> OS:         Fedora 13
> Java:       Oracle/Sun jdk/jre 1.6.0_21 (32 bit)
> Container:  Tomcat 6.0.18 (but see notes below)
> IDE:        NetBeans 6.8 with Portal Pack 3.0.3
> Build tool: Maven 2.2.1
>
> I used NetBeans 6.8 (waiting until the Portal Pack gets ported to 6.9.1)
> to create the Maven project. This worked cleanly, creating the master
> project and two modules.
>
> I added some custom goals to mimic jetspeed:mvn -Dtarget=<name>. Creating
> a Generic Portlet worked as expected (sans Override annotations - looks
> like a Portal Pack issue), and makes the appropriate portlet.xml
> modifications.
>
> Some issues:
>
> I did find the JIRA issue with page.security and fixed that in the
> project.
>
> I also found that:
>
> http://portals.apache.org/jetspeed-2/tutorial/02/default-page.html
>
> seems to point to the wrong page to be modified. The page I had to modify
> to change the style was:
>
> jetexpress-portal/src/main/webapp/WEB-INF/pages/folder.metadata
>
> When doing multiple installs using the jetspeed:mvn -Dtarget=deploy-pa,
> jetspeed:mvn -Dtarget=deploy-portal, the $CATALINA_HOME/lib jars were
> copied (again). I'm not sure why this is necessary.
>
> When running the build from the Maven artifact in Tomcat 6.0.18, I
> received the following error (277 lines, but I'm just posting the first
> few):
>
> 25.08.2010 14:24:40 ERROR
> [org.apache.jetspeed.page.document.psml.CastorFileSystemDocumentHandler.unmarshallDocument
> ():570] Could not unmarshal the file /home/myhome/Apache/Jetspeed/apache-
> tomcat-6.0.18/webapps/jetexpress/WEB-INF/pages/_template/new-user/default-
> page.psml Illegal Text data found as child of: page value: "
> AboutJetspeed"{File: [not available]; line: 33; column: 8}
>
> This is the end of the fragment describing the AboutJetspeed portlet in
> j2-admin. I didn't see anything obviously wrong, but then this is my
> first attempt using Jetspeed and portlets.
>
> So:
>
> 1. Why does the Maven target copy over the $CATALINA/lib jars every time?

Sounds like a bug... if you type:

mvn jetspeed:mvn -Dlist

you get a list of all commands and which subcommands are executed.
Funny though, I don't see a deploy-portal command

> 2. How can I fix the error message for the AboutJetspeed portlet?
>
I reviewed the file and it looks fine in the distribution. Sometimes
when you edit files like these with an editor that doesn't support
unicode (this particular file has Chinese and Korean localization),
the encoding is broken by the editor

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org