Most likely, at some point, your IDE moved the first component's .tml file from src/main/java to target/classes. That's just a guess.
When things start to act strangely, I start by doing a "jar tf myapp.war" to see what actually got packaged. On Sun, Jun 29, 2008 at 5:31 AM, Michael Zehender <[EMAIL PROTECTED]> wrote: > Hi, > > I finally found a solution! After digging into tapestry code to find out why > some components aren't transformed at > startup I found the source for the problem. > > Basically this strange error message means: "I can't find the template file > for the component xxx". Not that easy > to trace the exception back to this reason, therefore this quite, lets say > confusing error message. > > So it's a classpath problem. After that conclusion the rest was quite > simple. > > According to Tapestry Documentation: > > "Component templates are stored with the component class file. The files > have a ".tml" extension > (i.e., Tapestry Markup Language), and are stored in the same package as > corresponding > component class." > > Unfortunately that was my project structure I had the templates exactly in > the same directory as the java > classes. But then I read the next sentence: > > "Under a typical Maven directory structure, the Java class for a component > might be > src/main/java/org/example/myapp/components/MyComponent.java. The > corresponding template will be > src/main/resources/org/example/myapp/components/MyComponent.tml." > > I don't know what maven does exactly when packaging the application, however > it seems > that my first approach (taken from tapestry wiki) only works with a > component without any > further embedded components. Which is strange too ... why does it find the > template file > for the first component, but not the template file for the second (which > resides in the same > directory). > > So after several hours the simple solution was to move the templates to the > resources directory > > and it works! > > Cheers, > Michael > > > On Jun 29, 2008, at 1:07 PM, Michael Zehender wrote: > >> Hi, >> >> I've just created a test case with PageTester and running the test gives >> the same exception as running the >> application via maven (I guess, because it uses the same jetty >> configuration as mvn jetty:run does ...) >> >> Is there a way to configure eager class transformations? >> >> or how does eclipse/jetty influence the configuration to perform eager >> class transformations? >> >> Thanks, >> Michael >> >> >> On Jun 29, 2008, at 12:47 PM, Christian Riedel wrote: >> >>> Hi, >>> I have a similar problem with the same error when I try to develop on >>> Ubuntu Linux. The same code in the same environment (eclipse, tomcat5.5) >>> works fine when I use Windows or OS X... >>> >>> >>> Michael Zehender schrieb: >>>> >>>> Hi, >>>> >>>> I've just finished the development of a t5 application, my environment >>>> is maven/eclipse/jetty launcher >>>> and inside this environment everything works just fine. >>>> >>>> However there are some problems outside this environment, especially >>>> outside launching jetty via >>>> eclipse. >>>> >>>> If I run mvn jetty:run (or use jetty/tomcat of my production >>>> environment), it starts up and finds all necessary >>>> components and packages. As soon as I access the start page an exception >>>> page is shown: >>>> >>>> org.apache.tapestry5.ioc.internal.util.TapestryException: Component >>>> Index:layout does not contain an embedded component with id 'sidebar'. >>>> Available components: (none). >>>> ... >>>> >>>> I've compared the startup of the elipse/jetty with mvn jetty:run and the >>>> difference is: >>>> >>>> eclipse/jetty: executes every class transformation of every >>>> single component and page before rendering the start page >>>> >>>> mvn jetty:run: just executes the class transformation of layout and >>>> the start page >>>> >>>> >>>> The component which isn't found (sidebar) is embedded within the layout >>>> component. >>>> >>>> I'd be pleased if somebody would have a solution/workaround to run my >>>> application in the production environment. >>>> >>>> Thanks, >>>> Michael >>>> >>>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe, e-mail: [EMAIL PROTECTED] >>>> For additional commands, e-mail: [EMAIL PROTECTED] >>>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: [EMAIL PROTECTED] >>> For additional commands, e-mail: [EMAIL PROTECTED] >>> >> > > -- Howard M. Lewis Ship Creator Apache Tapestry and Apache HiveMind --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]