I'm all for extending the usefulness of the mappers... if you want to
share your extensions/customizations we can bring them back into Ode
(assuming they can apply to others).
Simply open a jira issue with your code (even if experimental) and a
description of what it does and what you're trying to achieve.
alex
On 8/31/07, jbi joe <[EMAIL PROTECTED]> wrote:
>
> I have done the same thing.
> WHy isnt there more flexibility with mappers?
> I need a mapper to be able to process soapmessages
> that contain Documents with attachments and user data.
>
>
> eburgos wrote:
> >
> > Tried in several ways and I got the same error, I ended up temporarily
> > modifying ServiceMixMapper class cause I'm in a hurry :(
> >
> >
> >
> > On 8/28/07, Alex Boisvert <[EMAIL PROTECTED]> wrote:
> >>
> >> Then you most likely have a classloading problem: different versions of
> >> the
> >> Mapper interface in different classloaders. The easiest solution is to
> >> place your Mapper class in the ode-jbi.jar.
> >>
> >> alex
> >>
> >>
> >> On 8/28/07, Eduardo Burgos <[EMAIL PROTECTED]> wrote:
> >> >
> >> > I see this in OdeLifeCycle.java line 148
> >> >
> >> > try {
> >> > _ode.registerMapper((Mapper) mapperClass.newInstance());
> >> > } catch (Throwable t) {
> >> > String errmsg =
> >> >
> >> >
> >>
> __msgs.msgOdeInitMapperInstantiationFailed(_ode._config.getMessageMapper());
> >> > __log.error(errmsg);
> >> > throw new JBIException(errmsg, t);
> >> > }
> >> >
> >> > it catches an exception there, in the debugger I saw that Throwable t
> >> was
> >> > actually a ClassCastException. I tried the class with a public no
> >> argument
> >> > constructor, the errors differ a little but it ends up being a
> >> > ClassCastException at the same point too. I know for sure that my class
> >> is
> >> > a
> >> > Mapper because it inherits the ServiceMixMapper.
> >> >
> >> >
> >> >
> >> > On 8/28/07, Alex Boisvert <[EMAIL PROTECTED]> wrote:
> >> > >
> >> > > Does your class have a public no-argument constructor? Ode uses
> >> > > Class.newInstance() to create instances of Mapper classes. Also,
> >> check
> >> > > your log file again, I think there must be a more specific error
> >> message
> >> > > just above/below the error statement you sent.
> >> > >
> >> > > alex
> >> > >
> >> > >
> >> > > On 8/28/07, Eduardo Burgos <[EMAIL PROTECTED]> wrote:
> >> > > >
> >> > > > Is there a way to change the default ServicemixMapper to another
> >> class
> >> > > of
> >> > > > your own? It seems that editing ode-jbi.properties wont do
> >> much.Iedited
> >> > > > with my own class name and I got this at startup:
> >> > > >
> >> > > > ERROR - ComponentMBeanImpl - Could not start component
> >> > > > javax.jbi.JBIException: Message mapper class "
> >> > > > org.test.ode.CustomOdeServicemixMapper" could not be instantiated!
> >> > > > at org.apache.ode.jbi.OdeLifeCycle.initMappers(
> >> > OdeLifeCycle.java
> >> > > > :153)
> >> > > > at org.apache.ode.jbi.OdeLifeCycle.init(OdeLifeCycle.java
> >> :104)
> >> > > > at
> >> org.apache.servicemix.jbi.framework.ComponentMBeanImpl.init
> >> > (
> >> > > > ComponentMBeanImpl.java:200)
> >> > > > at
> >> > > org.apache.servicemix.jbi.framework.ComponentMBeanImpl.doStart(
> >> > > > ComponentMBeanImpl.java:286)
> >> > > > at
> >> > org.apache.servicemix.jbi.framework.ComponentMBeanImpl.start(
> >> > > > ComponentMBeanImpl.java:215)
> >> > > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> >> Method)
> >> > > > at sun.reflect.NativeMethodAccessorImpl.invoke(
> >> > > > NativeMethodAccessorImpl.java:39)
> >> > > > at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> >> > > > DelegatingMethodAccessorImpl.java:25)
> >> > > > at java.lang.reflect.Method.invoke(Method.java:585)
> >> > > > at org.apache.commons.beanutils.MethodUtils.invokeMethod(
> >> > > > MethodUtils.java:216)
> >> > > >
> >> > > >
> >> > > > My class goes as follows:
> >> > > >
> >> > > > public class CustomOdeServicemixMapper extends ServiceMixMapper {
> >> > > >
> >> > > >
> >> > > > @Override
> >> > > > public void toNMS(NormalizedMessage nms, Message odeMsg,
> >> > > > javax.wsdl.Message msgdef, QName fault) throws MessagingException,
> >> > > > MessageTranslationException {
> >> > > >
> >> > > > //Some code here
> >> > > >
> >> > > > super.toNMS(nms, odeMsg, msgdef, fault);
> >> > > > }
> >> > > > }
> >> > > >
> >> > > >
> >> > > >
> >> > > >
> >> > > > Any ideas?
> >> > > >
> >> > > > Thanks in advance,
> >> > > >
> >> > >
> >> >
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/about-custom-mappers-tf4342420.html#a12431015
> Sent from the Apache Ode User mailing list archive at Nabble.com.
>
>