RE: SV: SV: using tld2claycfg
Craig, Thanks but no luck. I get the same problem when I do a mvn clean install from C:\tld2claycfg\test The thing I don't get is that I would expect an exception like I got before. Something like: Missing: -- 1) org.apache.shale:Tld2ClayCfg:jar:1.0-SNAPSHOT And not a java.lang.NoClassDefFoundError. I hope you guys have some more pointers. In the mean time I'll keep trying. Cuz with persistence, it always works in the end ;-) Joost -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Craig McClanahan Sent: Monday, April 23, 2007 5:11 PM To: user@shale.apache.org Subject: Re: SV: SV: using tld2claycfg Joost, Could you try one off the wall idea for me? I note from the trace below that the directory path to the location you are using has spaces in the name (Program Files). Could you try doing this in a directory that does *not* have spaces and see if you get the same behavior? I have seen lots of very wierd problems where this has been the root cause. (Of course, if it works after trying this, there's clearly a bug in path handling -- the next step will be to figure out where that is.) Craig On 4/22/07, JS Portal Support [EMAIL PROTECTED] wrote: Hi, Thnaks, that helped me and I think I'm almost there. I'm starting to understand maven e bit. I managed to get to the last step successfully, but there I get the error show below [1]. It seems to me I probably don't have myfacses-tomahawk properly installed in my repository. Any clues? To get to this point I had to have maven install a few things like tomahawk and myfaces. But since I've just been working on one machine to build and deploy through ant, both subversion and maven are new to me. I don't quite get how I can simply install all of myfaces including the subprojects to my local repository. Is there a step-by-step guide which lines this out; not assuming any prior knowledge of svn and mvn? I've been spending a few days on just trying to use a s:subForm with clay. Learning a lot thought ;-) Thanks, Joost [1]the error: C:\Program Files\Java\tld2claycfg\testmvn clean install [INFO] Scanning for projects... [INFO] - --- [INFO] Building Tld2ClayCfg Maven testapplication [INFO]task-segment: [clean, install] [INFO] - --- [INFO] [clean:clean] [INFO] Deleting directory C:\Program Files\Java\tld2claycfg\test\target [INFO] Deleting directory C:\Program Files\Java\tld2claycfg\test\target\classes [INFO] Deleting directory C:\Program Files\Java\tld2claycfg\test\target\test-cla sses [INFO] [Tld2ClayCfgMojo:convert {execution: convert tld}] [INFO] Generate resources in C:\Program Files\Java\tld2claycfg\test\target [INFO] Got: 1 tlds [INFO] Converting: META-INF/myfaces_sandbox.tld [INFO] [ERROR] FATAL ERROR [INFO] [INFO] org/apache/myfaces/shared_tomahawk/taglib/UIComponentTagBase [INFO] [INFO] Trace java.lang.NoClassDefFoundError: org/apache/myfaces/shared_tomahawk/taglib/UIComp onentTagBase at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12 4) at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) at java.net.URLClassLoader.access$100(URLClassLoader.java:56) at java.net.URLClassLoader$1.run(URLClassLoader.java:195) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at org.apache.shale.clay.util.TldToClayconfig.isUIComponentTag(TldToClay config.java:560) at org.apache.shale.clay.util.TldToClayconfig.writeConfigFile(TldToClayc onfig.java:447) at org.apache.shale.clay.util.TldToClayconfig.convert(TldToClayconfig.ja va:275) at org.apache.shale.Tld2ClayCfgMojo.execute(Tld2ClayCfgMojo.java:81) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi nManager.java:443) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa ultLifecycleExecutor.java:539) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi fecycle(DefaultLifecycleExecutor.java:480) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau ltLifecycleExecutor.java:459) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
Re: componentType=override
Did it, but now i get: java.lang.RuntimeException: javax.faces.FacesException: Undefined component type org.apache.myfaces.custom.updateactionlistener.UpdateActionListener org.apache.shale.clay.component.Clay.encodeBegin(Clay.java:393) org.apache.shale.clay.component.Clay.recursiveRenderChildren(Clay.java:415) org.apache.shale.clay.component.Clay.recursiveRenderChildren(Clay.java:418) The chain is there, my chain class too. component jsfid=t:updateActionListener componentType=org.apache.myfaces.custom.updateactionlistener.UpdateActionListener extends=baseComponent attributes set name=propertyBinding bindingType=VB descriptionTarget EL value binding./description /set set name=valueBinding bindingType=VB descriptionSource EL value binding./description /set set name=converter bindingType=VB description Converter id for conversion of the source to the target /description /set /attributes /component Definition of the component. Whats missing? Why i get undefined componentType? Torsten Am Freitag, den 13.04.2007, 18:48 + schrieb Gary VanMatre: I am trying to use the updateActionListener from Tomahawk, using Hermods tomahawk 1.1.5 Snapshot xml for clay. But i get this exception: [181892007-04-13 18:33:17,488](org.apache.myfaces.application.ApplicationImpl)**ERROR**{org.apach e.myfaces.application.ApplicationImpl.createComponent:391} User: -Undefined component type override [181982007-04-13 18:33:17,497](org.apache.shale.clay.component.chain.CreateComponentCommand)**ERR OR**{org.apache.shale.clay.component.chain.CreateComponentCommand.execute:166} User: -Cannot create Component renderId=464 jsfid=t:updateActionListener componentType=override extends=t:updateActionListener allowBody=null facetName=null javax.faces.FacesException: Undefined component type override Hm according to the shale clay page, this componentType should be possible. Whats missing here? You need to define the listener as a top-level component setting the component type to the fully qualified path to the action listener. component jsfid=t:updateActionListener componentType=org.apache.myfaces.custom.updateactionlistener.UpdateActionListener .. ... /component... However, this won't work without further customizations because this action listener is statefull and has special value binding attributes. The JSP tag has to do some special processing [1]. You will need to create a custom handler to create the listener. There is an example in the sandbox for the Trinidad version of the same thing. First you will need to add a commons chains config file to the WEB-INF folder of your web app [2]. Add a catalog with the name clayCustomizations. Add a chain with the name of preprocessAddActionListener the the catalog. catalog name=clayCustomization chain name=preprocessAddActionListener command className=acme.tomahawk.CreateActionListenerCommand / /chain /catalog Next, create a commons chains command extending org.apache.shale.clay.component.chain.CreateActionListenerCommand. Add the extra logic to handle the special attributes [3]. [1] http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/updateactionlistener/UpdateActionListenerTag.java?view=markup [2] http://svn.apache.org/viewvc/shale/sandbox/shale-clay-trinidad/src/main/webapp/WEB-INF/chain-config.xml?view=markup [3] http://svn.apache.org/viewvc/shale/sandbox/shale-clay-trinidad/src/main/java/org/apache/shale/clay/component/chain/trinidad/CreateActionListenerCommand.java?view=markup Torsten Gary smime.p7s Description: S/MIME cryptographic signature
RE: SV: SV: using tld2claycfg
Dear Hermod, Hermod, Hermod, I got it to work! Thanks a lot! For reference I will lay out what I did. I did not have the dependency on tomahawk in the Tld2ClayCfg/test/pom.xml because I did not need the clay cfg for it. Adding it did cause the java.lang.NoClassDefFoundError to go away. It still didn't build though as it couldn't find the: Missing: -- 1) org.apache.myfaces.tomahawk:tomahawk:jar:1.1.5-SNAPSHOT Your comments on the settings.xml made me do a little search and I found [1] explaining that you need to add repositories to your project to use SNAPSHOT releases. I haven't figured out how to add these repositories globally in my settings (any pointers would be great?) but adding them to my project like [2] did the trick. I had to play a bit with artifactId's and versions but managed to figure those out by browsing what was available at [3]. I can finally start and use my subForms which what I needed this for in the first place. I'm happy to have been introduced to maven and am contemplating integration in my own projects. I hope you have had a good weekend. But judging by your response time you, like me, don't differentiate between weekdays and a weekends ;-) Cheers, Joost [1] http://wiki.apache.org/myfaces/Using_MyFaces_in_a_Project_built_with_Maven [2] repositories repository releases enabledtrue/enabled /releases snapshots enabledfalse/enabled /snapshots idmyfaces.staging/id nameMyFaces Staging Repository/name urlhttp://myfaces.zones.apache.org/dist/maven-repository/url /repository repository snapshots enabledtrue/enabled /snapshots idapache.snapshots/id nameApache Snapshot Repository/name urlhttp://people.apache.org/repo/m2-snapshot-repository/url /repository /repositories [3] http://people.apache.org/repo/m2-snapshot-repository/org/apache/myfaces/toma hawk/ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, April 23, 2007 9:40 PM To: [EMAIL PROTECTED] Subject: FW: SV: SV: using tld2claycfg Hi Looks like my mails are still delayed, so I'm sending it directly Hermod -Original Message- From: Opstvedt, Hermod Sent: Monday, April 23, 2007 8:45 AM To: 'user@shale.apache.org' Subject: RE: SV: SV: using tld2claycfg Hi Have you declared the dependency on tomahawk? Here is a sample to consider: .. plugin groupIdorg.apache.shale/groupId artifactIdTld2ClayCfgMojo/artifactId version1.0-SNAPSHOT/version executions execution idconvert tld/id phasegenerate-resources/phase goals goalconvert/goal /goals /execution /executions configuration tlds tld implementation=org.apache.shale.Tld nameMETA-INF/tomahawk.tld/name version1.1.6-SNAPSHOT/version mbFilter(?i).*Listener.*,(?i).*Validate.*,(?i).*Convert.*/mbFilter acFilter(?i).*Listener.*,(?i).*Validate.*,(?i).*Convert.*/acFilter /tld /tlds .. dependencies dependency groupIdorg.apache.myfaces.tomahawk/groupId artifactIdtomahawk/artifactId version1.1.6-SNAPSHOT/version /dependency /dependencies Actually if you have your (Maven2) settings.xml file set up correct you should not need to build any of the MyFaces or Tomahawk stuff your self, because it will get downloaded. A trick is to use mvn -U clean installl Hermod -Original Message- From: JS Portal Support [mailto:[EMAIL PROTECTED] Sent: Monday, April 23, 2007 5:16 AM To: user@shale.apache.org Subject: RE: SV: SV: using tld2claycfg Hi, Thnaks, that helped me and I think I'm almost there. I'm starting to understand maven e bit. I managed to get to the last step successfully, but there I get the error show below [1]. It seems to me I probably don't have myfacses-tomahawk properly installed in my repository. Any clues? To get to this point I had to have maven install a few things like tomahawk and myfaces. But since I've just been working on one machine to build and deploy through ant, both subversion and maven are new to me. I don't quite get how I can simply install all of myfaces including the subprojects to my local repository. Is there a step-by-step guide which lines this out; not assuming any prior knowledge of svn and mvn? I've been spending a few days on just trying to use a s:subForm with clay. Learning a lot thought ;-) Thanks, Joost [1]the error: C:\Program Files\Java\tld2claycfg\testmvn clean install [INFO] Scanning for projects... [INFO] - --- [INFO] Building Tld2ClayCfg Maven testapplication [INFO]task-segment: [clean, install] [INFO]
Re: componentType=override
Hm - the updateActionListener component does not define a COMPONENT_TYPE. Whats now? How can i declare this component to use it with clay? Torsten Am Montag, den 23.04.2007, 12:49 +0200 schrieb Torsten Krah: Did it, but now i get: java.lang.RuntimeException: javax.faces.FacesException: Undefined component type org.apache.myfaces.custom.updateactionlistener.UpdateActionListener org.apache.shale.clay.component.Clay.encodeBegin(Clay.java:393) org.apache.shale.clay.component.Clay.recursiveRenderChildren(Clay.java:415) org.apache.shale.clay.component.Clay.recursiveRenderChildren(Clay.java:418) The chain is there, my chain class too. component jsfid=t:updateActionListener componentType=org.apache.myfaces.custom.updateactionlistener.UpdateActionListener extends=baseComponent attributes set name=propertyBinding bindingType=VB descriptionTarget EL value binding./description /set set name=valueBinding bindingType=VB descriptionSource EL value binding./description /set set name=converter bindingType=VB description Converter id for conversion of the source to the target /description /set /attributes /component Definition of the component. Whats missing? Why i get undefined componentType? Torsten Am Freitag, den 13.04.2007, 18:48 + schrieb Gary VanMatre: I am trying to use the updateActionListener from Tomahawk, using Hermods tomahawk 1.1.5 Snapshot xml for clay. But i get this exception: [181892007-04-13 18:33:17,488](org.apache.myfaces.application.ApplicationImpl)**ERROR**{org.apach e.myfaces.application.ApplicationImpl.createComponent:391} User: -Undefined component type override [181982007-04-13 18:33:17,497](org.apache.shale.clay.component.chain.CreateComponentCommand)**ERR OR**{org.apache.shale.clay.component.chain.CreateComponentCommand.execute:166} User: -Cannot create Component renderId=464 jsfid=t:updateActionListener componentType=override extends=t:updateActionListener allowBody=null facetName=null javax.faces.FacesException: Undefined component type override Hm according to the shale clay page, this componentType should be possible. Whats missing here? You need to define the listener as a top-level component setting the component type to the fully qualified path to the action listener. component jsfid=t:updateActionListener componentType=org.apache.myfaces.custom.updateactionlistener.UpdateActionListener .. ... /component... However, this won't work without further customizations because this action listener is statefull and has special value binding attributes. The JSP tag has to do some special processing [1]. You will need to create a custom handler to create the listener. There is an example in the sandbox for the Trinidad version of the same thing. First you will need to add a commons chains config file to the WEB-INF folder of your web app [2]. Add a catalog with the name clayCustomizations. Add a chain with the name of preprocessAddActionListener the the catalog. catalog name=clayCustomization chain name=preprocessAddActionListener command className=acme.tomahawk.CreateActionListenerCommand / /chain /catalog Next, create a commons chains command extending org.apache.shale.clay.component.chain.CreateActionListenerCommand. Add the extra logic to handle the special attributes [3]. [1] http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/updateactionlistener/UpdateActionListenerTag.java?view=markup [2] http://svn.apache.org/viewvc/shale/sandbox/shale-clay-trinidad/src/main/webapp/WEB-INF/chain-config.xml?view=markup [3] http://svn.apache.org/viewvc/shale/sandbox/shale-clay-trinidad/src/main/java/org/apache/shale/clay/component/chain/trinidad/CreateActionListenerCommand.java?view=markup Torsten Gary smime.p7s Description: S/MIME cryptographic signature
[shale-remote] SesionBeans in MyFaces/Portlet Application
Hi all, I have made some small tests using shale-remote to make AJAX updates within my MyFaces-Portlet, but I found, that the session scoped ManagedBean is instantiated twice! I use the: * shale-remote of SVN (last week) * Apache Portlet bridge 1.0 * MyFaces/Tomahawk 1.1.5 I think, there are created two different contexts but not shure. Has already had someone this problem? Regards, Stephan
RE: [shale-remote] SesionBeans in MyFaces/Portlet Application
If the Bean is in session scope I would expect only one bean per session or am I wrong? -Original Message- From: Hermod Opstvedt [mailto:[EMAIL PROTECTED] Sent: Monday, April 23, 2007 4:53 PM To: user@shale.apache.org Subject: SV: [shale-remote] SesionBeans in MyFaces/Portlet Application Hi Indeed - Once going in on the post, and then again going out on the render response. Hermod -Opprinnelig melding- Fra: Strittmatter, Stephan [mailto:[EMAIL PROTECTED] Sendt: 23. april 2007 16:50 Til: user@shale.apache.org Emne: [shale-remote] SesionBeans in MyFaces/Portlet Application Hi all, I have made some small tests using shale-remote to make AJAX updates within my MyFaces-Portlet, but I found, that the session scoped ManagedBean is instantiated twice! I use the: * shale-remote of SVN (last week) * Apache Portlet bridge 1.0 * MyFaces/Tomahawk 1.1.5 I think, there are created two different contexts but not shure. Has already had someone this problem? Regards, Stephan
RE: [shale-remote] SesionBeans in MyFaces/Portlet Application
From: Strittmatter, Stephan [EMAIL PROTECTED] If the Bean is in session scope I would expect only one bean per session or am I wrong? Session scope is defined to the web container by the jsessionid. Does your remote request contain the jsessionid as a query parameters? Try using the ExternalContext.encodeResourceURL method to build the URL used by the remoting call. That's probably the only option if this is truly a portlet. -Original Message- From: Hermod Opstvedt [mailto:[EMAIL PROTECTED] Sent: Monday, April 23, 2007 4:53 PM To: user@shale.apache.org Subject: SV: [shale-remote] SesionBeans in MyFaces/Portlet Application Hi Indeed - Once going in on the post, and then again going out on the render response. Hermod -Opprinnelig melding- Fra: Strittmatter, Stephan [mailto:[EMAIL PROTECTED] Sendt: 23. april 2007 16:50 Til: user@shale.apache.org Emne: [shale-remote] SesionBeans in MyFaces/Portlet Application Hi all, I have made some small tests using shale-remote to make AJAX updates within my MyFaces-Portlet, but I found, that the session scoped ManagedBean is instantiated twice! I use the: * shale-remote of SVN (last week) * Apache Portlet bridge 1.0 * MyFaces/Tomahawk 1.1.5 I think, there are created two different contexts but not shure. Has already had someone this problem? Regards, Stephan
RE: SV: SV: using tld2claycfg
Hi Have you declared the dependency on tomahawk? Here is a sample to consider: .. plugin groupIdorg.apache.shale/groupId artifactIdTld2ClayCfgMojo/artifactId version1.0-SNAPSHOT/version executions execution idconvert tld/id phasegenerate-resources/phase goals goalconvert/goal /goals /execution /executions configuration tlds tld implementation=org.apache.shale.Tld nameMETA-INF/tomahawk.tld/name version1.1.6-SNAPSHOT/version mbFilter(?i).*Listener.*,(?i).*Validate.*,(?i).*Convert.*/mbFilter acFilter(?i).*Listener.*,(?i).*Validate.*,(?i).*Convert.*/acFilter /tld /tlds .. dependencies dependency groupIdorg.apache.myfaces.tomahawk/groupId artifactIdtomahawk/artifactId version1.1.6-SNAPSHOT/version /dependency /dependencies Actually if you have your (Maven2) settings.xml file set up correct you should not need to build any of the MyFaces or Tomahawk stuff your self, because it will get downloaded. A trick is to use mvn -U clean installl Hermod -Original Message- From: JS Portal Support [mailto:[EMAIL PROTECTED] Sent: Monday, April 23, 2007 5:16 AM To: user@shale.apache.org Subject: RE: SV: SV: using tld2claycfg Hi, Thnaks, that helped me and I think I'm almost there. I'm starting to understand maven e bit. I managed to get to the last step successfully, but there I get the error show below [1]. It seems to me I probably don't have myfacses-tomahawk properly installed in my repository. Any clues? To get to this point I had to have maven install a few things like tomahawk and myfaces. But since I've just been working on one machine to build and deploy through ant, both subversion and maven are new to me. I don't quite get how I can simply install all of myfaces including the subprojects to my local repository. Is there a step-by-step guide which lines this out; not assuming any prior knowledge of svn and mvn? I've been spending a few days on just trying to use a s:subForm with clay. Learning a lot thought ;-) Thanks, Joost [1]the error: C:\Program Files\Java\tld2claycfg\testmvn clean install [INFO] Scanning for projects... [INFO] - --- [INFO] Building Tld2ClayCfg Maven testapplication [INFO]task-segment: [clean, install] [INFO] - --- [INFO] [clean:clean] [INFO] Deleting directory C:\Program Files\Java\tld2claycfg\test\target [INFO] Deleting directory C:\Program Files\Java\tld2claycfg\test\target\classes [INFO] Deleting directory C:\Program Files\Java\tld2claycfg\test\target\test-cla sses [INFO] [Tld2ClayCfgMojo:convert {execution: convert tld}] [INFO] Generate resources in C:\Program Files\Java\tld2claycfg\test\target [INFO] Got: 1 tlds [INFO] Converting: META-INF/myfaces_sandbox.tld [INFO] [ERROR] FATAL ERROR [INFO] [INFO] org/apache/myfaces/shared_tomahawk/taglib/UIComponentTagBase [INFO] [INFO] Trace java.lang.NoClassDefFoundError: org/apache/myfaces/shared_tomahawk/taglib/UIComp onentTagBase at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12 4) at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) at java.net.URLClassLoader.access$100(URLClassLoader.java:56) at java.net.URLClassLoader$1.run(URLClassLoader.java:195) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at org.apache.shale.clay.util.TldToClayconfig.isUIComponentTag(TldToClay config.java:560) at org.apache.shale.clay.util.TldToClayconfig.writeConfigFile(TldToClayc onfig.java:447) at org.apache.shale.clay.util.TldToClayconfig.convert(TldToClayconfig.ja va:275) at org.apache.shale.Tld2ClayCfgMojo.execute(Tld2ClayCfgMojo.java:81) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi nManager.java:443) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa ultLifecycleExecutor.java:539) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi fecycle(DefaultLifecycleExecutor.java:480) at