having problems deploying Camel 2.10.2 on Glassfish 3.1.2.2 (build 4) on AIX
with IBM 1.6 JDK - 64 bit - build pap6460sr13fp2-20130424_01(SR13 FP2).

The exception, noted at the bottom, happens when it tries to load the Camel
Context that utilizes a Producer Template.  This works perfectly on both
Windows and Ubuntu implementations.

I've looked on IBM's website and there was a issue in the JDK with bean
introspection.  I've patched the JDK with SR13 FP2, but still get the same
problem.  Here is the link for the supposed fix:
        http://www-01.ibm.com/support/docview.wss?uid=swg1IZ90916
        
Here is my camel context that declares it:

{code}
    <camel:camelContext id="ngms-context-filebatch-producer"
xmlns="http://camel.apache.org/schema/spring";>

        <camel:template id="fbtemplate"
defaultEndpoint="activemq:ngmsBatchProcessing" />
    </camel:camelContext>
    
        <bean id="fbprocessor"
class="com.nextgate.ms.component.adapter.filebatch.FileBatchProcessor">
                <property name="producer" ref="fbtemplate" />
        </bean>

        <camel:camelContext id="ngms-context-filebatch-in"
xmlns="http://camel.apache.org/schema/spring"; >
        
        <camel:routeContextRef ref="ngms-routecontext-hl7v2" />
        <camel:routeContextRef ref="ngms-routecontext-audits" />
        
                <camel:endpoint id="fbendpoint" 
                
uri="file://{{nextgate.ms.batchfile.basedir}}/inbox?delay=5000&amp;include=.*\.{{nextgate.ms.batchfile.pollext}}&amp;sortBy=file:modified&amp;preMove=../inprocess/&amp;move=../done/"
/>

                <camel:route id="ngms-route-filebatch-in">
                
                        <camel:from ref="fbendpoint" />
                        <camel:process ref="fbprocessor" />
                        
                        <camel:to uri="mock:result" />
                </camel:route>
                
                <camel:route id="ngms-route-filebatch-fbqueue"
routePolicyRef="fbThrottlePolicy">
                
                        <camel:from uri="activemq:ngmsBatchProcessing" />
                
                        <choice>
                                <when><simple>${header.ngmsMessageTypeTrigger} 
contains 'HL7v2'</simple>
                                                
                                    <unmarshal ref="ngmsHL7v2" />
                                    
                        <process ref="ngmsPerfTrackReceive" />
                                    <process ref="ngmsJournalProcessor" />
                                    
                                                <to 
uri="direct:ngmsHL7v2Processing" />
                                </when>
                        </choice>
                </camel:route>
                
        </camel:camelContext>
{code}

Here is my processor implementation:

{code}
public class FileBatchProcessor implements Processor {

        org.apache.camel.ProducerTemplate producer;

    public void process(Exchange ex) throws Exception {
        
       ... do stuff and call sendRecord()
        }
        
    private void sendRecord(Filetype filetype, final String rec,
StringBuffer headerRecs) throws Exception {

        if (LOG.isTraceEnabled()) LOG.trace("    + sending record:\r\n{}",
rec.replace("\r", "\r\n"));
        
        final String messageTypeTrigger = getTypeTrigger(filetype);
        final String fileHeaderControlId = this.getFileHeaderControlId();
        final String filename = this.getFileName();
        
        producer.send(producer.getDefaultEndpoint(), ExchangePattern.InOnly,
new Processor() {
                public void process(Exchange outExchange) {
                        
outExchange.getIn().setHeader(NGMSConstants.MESSAGETYPE_TRIGGER,
messageTypeTrigger);
                        
outExchange.getIn().setHeader(NGMSConstants.BATCH_FILEHEADER_CONTROL,
fileHeaderControlId);
                        outExchange.getIn().setHeader(Exchange.FILE_NAME, 
filename);
                        outExchange.getIn().setBody(rec);
                        
                }
        });
    }
        
        public void setProducer(org.apache.camel.ProducerTemplate producer) {
                
                this.producer = producer;
        }
        
        public org.apache.camel.ProducerTemplate getProducer() {
                return producer;
        }
        
{code}

Any and all help is greatly appreciated!!!!

receiving the following error when deploying:
{code}
[#|2013-06-05T16:11:17.722-0400|SEVERE|oracle-glassfish3.1.2|org.apache.catalina.core.ContainerBase|_ThreadID=10;_ThreadName=Thread-11;|ContainerBase.addChild:
start:
org.apache.catalina.LifecycleException:
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'fbtemplate': Initialization of bean failed; nested exception is
org.springframework.bea
ns.FatalBeanException: Failed to obtain BeanInfo for class
[org.apache.camel.spring.CamelProducerTemplateFactoryBean]; nested exception
is java.beans.IntrospectionException: Parameter type in getter method does
not
corresponds to predefined.
        at
org.apache.catalina.core.StandardContext.start(StandardContext.java:5389)
        at com.sun.enterprise.web.WebModule.start(WebModule.java:498)
        at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:917)
        at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:901)
        at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:733)
        at
com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:2019)
        at
com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1669)
        at
com.sun.enterprise.web.WebApplication.start(WebApplication.java:109)
        at org.glassfish.internal.data.EngineRef.start(EngineRef.java:130)
        at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:269)
        at
org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:301)
        at
com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:461)
        at
com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
        at
org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:389)
        at
com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:348)
        at
com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:363)
        at
com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1085)
        at
com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:95)
        at
com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1291)
        at
com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1259)
        at
org.glassfish.admin.rest.ResourceUtil.runCommand(ResourceUtil.java:214)
        at
org.glassfish.admin.rest.ResourceUtil.runCommand(ResourceUtil.java:207)
        at
org.glassfish.admin.rest.resources.TemplateListOfResource.createResource(TemplateListOfResource.java:148)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:600)
        at
com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
        at
com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205)
        at
com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
        at
com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:288)
        at
com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:134)
        at
com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
        at
com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:134)
        at
com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
        at
com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
        at
com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
        at
com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
        at
com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1469)
        at
com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1400)
        at
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1349)
        at
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1339)
        at
com.sun.jersey.server.impl.container.grizzly.GrizzlyContainer._service(GrizzlyContainer.java:182)
        at
com.sun.jersey.server.impl.container.grizzly.GrizzlyContainer.service(GrizzlyContainer.java:147)
        at
org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java:148)
        at
com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:179)
        at
com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
        at
com.sun.enterprise.v3.services.impl.ContainerMapper$Hk2DispatcherCallable.call(ContainerMapper.java:354)
        at
com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
        at
com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:860)
        at
com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:757)
        at
com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1056)
        at
com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:229)
        at
com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
        at
com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
        at
com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
        at
com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
        at
com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
        at
com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
        at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
        at
com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
        at
com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
        at java.lang.Thread.run(Thread.java:738)
Caused by: org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'fbtemplate': Initialization of bean failed; nested
exception is org.springframework.beans.FatalBeanException: Failed
 to obtain BeanInfo for class
[org.apache.camel.spring.CamelProducerTemplateFactoryBean]; nested exception
is java.beans.IntrospectionException: Parameter type in getter method does
not corresponds to predefined.
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
        at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
        at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
        at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
        at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
        at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:587)
        at
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:925)
        at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:472)
        at
org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:383)
        at
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:283)
        at
org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111)
        at
org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:4750)
        at
com.sun.enterprise.web.WebModule.contextListenerStart(WebModule.java:550)
        at
org.apache.catalina.core.StandardContext.start(StandardContext.java:5366)
        ... 62 more
Caused by: org.springframework.beans.FatalBeanException: Failed to obtain
BeanInfo for class
[org.apache.camel.spring.CamelProducerTemplateFactoryBean]; nested exception
is java.beans.IntrospectionException: Paramet
er type in getter method does not corresponds to predefined.
        at
org.springframework.beans.CachedIntrospectionResults.<init>(CachedIntrospectionResults.java:262)
        at
org.springframework.beans.CachedIntrospectionResults.forClass(CachedIntrospectionResults.java:149)
        at
org.springframework.beans.BeanWrapperImpl.getCachedIntrospectionResults(BeanWrapperImpl.java:324)
        at
org.springframework.beans.BeanWrapperImpl.getPropertyDescriptorInternal(BeanWrapperImpl.java:354)
        at
org.springframework.beans.BeanWrapperImpl.isWritableProperty(BeanWrapperImpl.java:430)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1362)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1118)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
        ... 76 more
Caused by: java.beans.IntrospectionException: Parameter type in getter
method does not corresponds to predefined.
        at
java.beans.PropertyDescriptor.setReadMethod(PropertyDescriptor.java:140)
        at
org.springframework.beans.ExtendedBeanInfo.addOrUpdatePropertyDescriptor(ExtendedBeanInfo.java:305)
        at
org.springframework.beans.ExtendedBeanInfo.addOrUpdatePropertyDescriptor(ExtendedBeanInfo.java:202)
        at
org.springframework.beans.ExtendedBeanInfo.<init>(ExtendedBeanInfo.java:172)
        at
org.springframework.beans.CachedIntrospectionResults.<init>(CachedIntrospectionResults.java:224)
        ... 83 more
|#]

{code}





--
View this message in context: 
http://camel.465427.n5.nabble.com/Producer-Template-Failure-on-Glassfish-AIX-tp5734027.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to