You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Sam Robertson <xm...@yahoo.com> on 2002/03/11 02:28:55 UTC

MappingException using CastorTransformer

Hi everyone,

I'm using the latest CVS build from 10th March, 2002
with scratchpad included.

When I go to
http://localhost:8080/cocoon/samples/castor/castor

the first time, I get:

[Default] org.exolab.castor.mapping.MappingException:
Could not find the class
org.apache.cocoon.samples.castor.TestBean
[Default] 	at
org.exolab.castor.mapping.loader.MappingLoader.createDescriptor(MappingLoader.java:300)
[Default] 
[Default] 	at
org.exolab.castor.xml.XMLMappingLoader.createDescriptor(XMLMappingLoader.java:140)

All the required Jar's
(castor-0.9.3.9-xml.jar,cocoon-scratchpad.jar, etc)
are in webapps/cocoon/web-inf/lib.

The strange thing is that I get the XML output as
well:

<?xml version="1.0" encoding="UTF-8" ?> 
 <zoo
xmlns:castor="http://castor.exolab.org/cocoontransfomer">
 <testBean>
  <name>Liveing in the session</name> 
  <scope>session</scope> 
  </testBean>
 <testBean>
  <name>Lion:walking on the sitemap</name> 
  <scope>sitemap</scope> 
  </testBean>
 <testBean>
  <name>Hamster:Wer hat nach mir gefragt</name> 
  <scope>request</scope> 
  </testBean>
 <testBean>
  <name>Wale in the big sea</name> 
  <scope>context</scope> 
  </testBean>
 <testBean>
  <name>Elefant:from Africa</name> 
  <scope>session</scope> 
  </testBean>
 <testBean>
  <name>Elefant:from India</name> 
  <scope>request</scope> 
 </testBean>
</zoo>

I'm using JBoss-2.4.3_Tomcat-3.2.3 with JDK 1.3.

If I refresh, I don't get the error again.  It only
happens the first time.  I tried another example and
it doesn't work either.

Any ideas please?

Regards,
Sam

__________________________________________________
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: MappingException using CastorTransformer

Posted by Sam Robertson <xm...@yahoo.com>.
I found the solution (silly classpath issues)

I had another castor.jar in the lib/ext folder of
jboss.  Since this is the one that got loaded up, it
didn't see the files in webapps/cocoon/web-inf/lib
where the TestBean was.

I deleted castor.jar (from lib/ext in jboss) and now
it works.  I still find this strange..but hey..it
works now. :)

Thanks for reading this response.

Regards,
Sam

--- Sam Robertson <xm...@yahoo.com> wrote:
> Hi everyone,
> 
> I'm using the latest CVS build from 10th March, 2002
> with scratchpad included.
> 
> When I go to
> http://localhost:8080/cocoon/samples/castor/castor
> 
> the first time, I get:
> 
> [Default]
> org.exolab.castor.mapping.MappingException:
> Could not find the class
> org.apache.cocoon.samples.castor.TestBean
> [Default] 	at
>
org.exolab.castor.mapping.loader.MappingLoader.createDescriptor(MappingLoader.java:300)
> [Default] 
> [Default] 	at
>
org.exolab.castor.xml.XMLMappingLoader.createDescriptor(XMLMappingLoader.java:140)
> 
> All the required Jar's
> (castor-0.9.3.9-xml.jar,cocoon-scratchpad.jar, etc)
> are in webapps/cocoon/web-inf/lib.
> 
> The strange thing is that I get the XML output as
> well:
> 
> <?xml version="1.0" encoding="UTF-8" ?> 
>  <zoo
>
xmlns:castor="http://castor.exolab.org/cocoontransfomer">
>  <testBean>
>   <name>Liveing in the session</name> 
>   <scope>session</scope> 
>   </testBean>
>  <testBean>
>   <name>Lion:walking on the sitemap</name> 
>   <scope>sitemap</scope> 
>   </testBean>
>  <testBean>
>   <name>Hamster:Wer hat nach mir gefragt</name> 
>   <scope>request</scope> 
>   </testBean>
>  <testBean>
>   <name>Wale in the big sea</name> 
>   <scope>context</scope> 
>   </testBean>
>  <testBean>
>   <name>Elefant:from Africa</name> 
>   <scope>session</scope> 
>   </testBean>
>  <testBean>
>   <name>Elefant:from India</name> 
>   <scope>request</scope> 
>  </testBean>
> </zoo>
> 
> I'm using JBoss-2.4.3_Tomcat-3.2.3 with JDK 1.3.
> 
> If I refresh, I don't get the error again.  It only
> happens the first time.  I tried another example and
> it doesn't work either.
> 
> Any ideas please?
> 
> Regards,
> Sam
> 
> __________________________________________________
> Do You Yahoo!?
> Try FREE Yahoo! Mail - the world's greatest free
> email!
> http://mail.yahoo.com/
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email:
> cocoon-dev-help@xml.apache.org
> 


__________________________________________________
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org