You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "F. Da Costa" <da...@xs4all.nl> on 2004/03/08 02:43:55 UTC

Multiple pages to 1 .java class gives an error?

Hi,

This question concerns two similar pages like:

<page-specification 
class="org.dcg.publicservice.wu.useradmin.register.Register">
	<property-specification name="clientType" initial-value="'*retail*'" 
type="java.lang.String" />
</page-specification>

<page-specification 
class="org.dcg.publicservice.wu.useradmin.register.Register">
	<property-specification name="clientType" initial-value="'*corporate*'" 
type="java.lang.String" />
</page-specification>

The .html specs differ (obviously).
As you can see they both use the same .java class.
The only difference is the way the data is processed after a submit has 
taken place.

When i call the first page all goes fine.
However, when i call the second page i get the following error

org.apache.tapestry.ApplicationRuntimeException
Could not load class org.dcg.service.wu.useradmin.register.Register from 
org.mortbay.http.ContextLoader(file:/C:/eclipse3/workspace/ffneuzen2/context/WEB-INF/classes/,file:/C:/eclipse3/workspace/ffneuzen2/context/WEB-INF/lib/perst.jar) 
/ sun.misc.Launcher$AppClassLoader@e80a59: 
org.dcg.service.wu.useradmin.register.Register

java.lang.ClassNotFoundException
org.dcg.service.wu.useradmin.register.Register
Stack Trace:

     * java.net.URLClassLoader$1.run(URLClassLoader.java:199)
     * java.security.AccessController.doPrivileged(Native Method)
     * java.net.URLClassLoader.findClass(URLClassLoader.java:187)
     * java.lang.ClassLoader.loadClass(ClassLoader.java:289)
     * sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
     * java.lang.ClassLoader.loadClass(ClassLoader.java:235)
     * org.mortbay.http.ContextLoader.loadClass(ContextLoader.java:233)
     * org.mortbay.http.ContextLoader.loadClass(ContextLoader.java:197)
     * java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
     * java.lang.Class.forName0(Native Method)
     * java.lang.Class.forName(Class.java:219)

Should this happen? I thought it would be ok to have multiple pages drawing 
on the same class.
During construction it passes through the detach() method and i can read 
the property via getProperty("clientType"). So part of the process is ok.

If the error is correct instead  why *does* it not throw the error for both 
  pages instead of just 1 (and why the first and not the second page)?

Any suggestions?

TIA
Fermin DCG


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


Re: Multiple pages to 1 .java class gives an error?

Posted by "F. Da Costa" <da...@xs4all.nl>.
Karel Miarka wrote:
> Hi,
> 
> I think it is a typo: You have *publicservice* in the page specification,
> but in the exception there is written "Could not load class *service*.
It actually had something to do with a path.to@CONST in the .java file.
Found it out shortly after posting (hence the deletion).

Thx for the reply anyway.

Fermin
> 
> Karel
> 
> ----- Original Message ----- 
> From: "F. Da Costa" <da...@xs4all.nl>
> To: <ta...@jakarta.apache.org>
> Sent: Monday, March 08, 2004 2:43 AM
> Subject: Multiple pages to 1 .java class gives an error?
> 
> 
> 
>>Hi,
>>
>>This question concerns two similar pages like:
>>
>><page-specification
>>class="org.dcg.publicservice.wu.useradmin.register.Register">
>><property-specification name="clientType" initial-value="'*retail*'"
>>type="java.lang.String" />
>></page-specification>
>>
>><page-specification
>>class="org.dcg.publicservice.wu.useradmin.register.Register">
>><property-specification name="clientType" initial-value="'*corporate*'"
>>type="java.lang.String" />
>></page-specification>
>>
>>The .html specs differ (obviously).
>>As you can see they both use the same .java class.
>>The only difference is the way the data is processed after a submit has
>>taken place.
>>
>>When i call the first page all goes fine.
>>However, when i call the second page i get the following error
>>
>>org.apache.tapestry.ApplicationRuntimeException
>>Could not load class org.dcg.service.wu.useradmin.register.Register from
>>
> 
> org.mortbay.http.ContextLoader(file:/C:/eclipse3/workspace/ffneuzen2/context
> /WEB-INF/classes/,file:/C:/eclipse3/workspace/ffneuzen2/context/WEB-INF/lib/
> perst.jar)
> 
>>/ sun.misc.Launcher$AppClassLoader@e80a59:
>>org.dcg.service.wu.useradmin.register.Register
>>
>>java.lang.ClassNotFoundException
>>org.dcg.service.wu.useradmin.register.Register
>>Stack Trace:
>>
>>     * java.net.URLClassLoader$1.run(URLClassLoader.java:199)
>>     * java.security.AccessController.doPrivileged(Native Method)
>>     * java.net.URLClassLoader.findClass(URLClassLoader.java:187)
>>     * java.lang.ClassLoader.loadClass(ClassLoader.java:289)
>>     * sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
>>     * java.lang.ClassLoader.loadClass(ClassLoader.java:235)
>>     * org.mortbay.http.ContextLoader.loadClass(ContextLoader.java:233)
>>     * org.mortbay.http.ContextLoader.loadClass(ContextLoader.java:197)
>>     * java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
>>     * java.lang.Class.forName0(Native Method)
>>     * java.lang.Class.forName(Class.java:219)
>>
>>Should this happen? I thought it would be ok to have multiple pages
> 
> drawing
> 
>>on the same class.
>>During construction it passes through the detach() method and i can read
>>the property via getProperty("clientType"). So part of the process is ok.
>>
>>If the error is correct instead  why *does* it not throw the error for
> 
> both
> 
>>  pages instead of just 1 (and why the first and not the second page)?
>>
>>Any suggestions?
>>
>>TIA
>>Fermin DCG
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>
>>
>>
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 
> 


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


Re: Multiple pages to 1 .java class gives an error?

Posted by Karel Miarka <ka...@issa.cz>.
Hi,

I think it is a typo: You have *publicservice* in the page specification,
but in the exception there is written "Could not load class *service*.

Karel

----- Original Message ----- 
From: "F. Da Costa" <da...@xs4all.nl>
To: <ta...@jakarta.apache.org>
Sent: Monday, March 08, 2004 2:43 AM
Subject: Multiple pages to 1 .java class gives an error?


> Hi,
>
> This question concerns two similar pages like:
>
> <page-specification
> class="org.dcg.publicservice.wu.useradmin.register.Register">
> <property-specification name="clientType" initial-value="'*retail*'"
> type="java.lang.String" />
> </page-specification>
>
> <page-specification
> class="org.dcg.publicservice.wu.useradmin.register.Register">
> <property-specification name="clientType" initial-value="'*corporate*'"
> type="java.lang.String" />
> </page-specification>
>
> The .html specs differ (obviously).
> As you can see they both use the same .java class.
> The only difference is the way the data is processed after a submit has
> taken place.
>
> When i call the first page all goes fine.
> However, when i call the second page i get the following error
>
> org.apache.tapestry.ApplicationRuntimeException
> Could not load class org.dcg.service.wu.useradmin.register.Register from
>
org.mortbay.http.ContextLoader(file:/C:/eclipse3/workspace/ffneuzen2/context
/WEB-INF/classes/,file:/C:/eclipse3/workspace/ffneuzen2/context/WEB-INF/lib/
perst.jar)
> / sun.misc.Launcher$AppClassLoader@e80a59:
> org.dcg.service.wu.useradmin.register.Register
>
> java.lang.ClassNotFoundException
> org.dcg.service.wu.useradmin.register.Register
> Stack Trace:
>
>      * java.net.URLClassLoader$1.run(URLClassLoader.java:199)
>      * java.security.AccessController.doPrivileged(Native Method)
>      * java.net.URLClassLoader.findClass(URLClassLoader.java:187)
>      * java.lang.ClassLoader.loadClass(ClassLoader.java:289)
>      * sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
>      * java.lang.ClassLoader.loadClass(ClassLoader.java:235)
>      * org.mortbay.http.ContextLoader.loadClass(ContextLoader.java:233)
>      * org.mortbay.http.ContextLoader.loadClass(ContextLoader.java:197)
>      * java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
>      * java.lang.Class.forName0(Native Method)
>      * java.lang.Class.forName(Class.java:219)
>
> Should this happen? I thought it would be ok to have multiple pages
drawing
> on the same class.
> During construction it passes through the detach() method and i can read
> the property via getProperty("clientType"). So part of the process is ok.
>
> If the error is correct instead  why *does* it not throw the error for
both
>   pages instead of just 1 (and why the first and not the second page)?
>
> Any suggestions?
>
> TIA
> Fermin DCG
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
>



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