Hi im having a problem when start mi service mix with a configuration jar
karaf@root> Exception in thread "SpringOsgiExtenderThread-2"
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'jndiFactoryBean' defined in URL
[bundle://192.0:0/META-INF/spring/camel-context.xml]: Invocation of init
method failed; nested exception is javax.naming.NoInitialContextException:
Cannot instantiate class: weblogic.jndi.WLInitialContextFactory [Root
exception is java.lang.ClassNotFoundException:
weblogic.jndi.WLInitialContextFactory not found from bundle
[billing.pr.claro.wl]]
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1482)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:521)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:610)
at
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
at
org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$1600(AbstractDelegatedExecutionApplicationContext.java:69)
at
org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:355)
at
org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
at
org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320)
at
org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:132)
my camel context:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:camel="http://camel.apache.org/schema/spring"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://camel.apache.org/schema/spring
http://camel.apache.org/schema/spring/camel-spring.xsd">
<bean id="billingFactory"
class="org.apache.activemq.ActiveMQConnectionFactory">
<property name="brokerURL"
value="failover:(tcp://http://10.100.1.52:8168)" />
<property name="userName" value="vassadmin" />
<property name="password" value="c+?gu0=35^!1I3qm" />
</bean>
<bean id="billingPool"
class="org.apache.activemq.pool.PooledConnectionFactory" init-method="start"
destroy-method="stop">
<property name="maxConnections" value="10" />
<property name="maximumActiveSessionPerConnection" value="10" />
<property name="connectionFactory" ref="billingFactory" />
<property name="idleTimeout" value="60" />
</bean>
<bean id="billingConf"
class="org.apache.camel.component.jms.JmsConfiguration">
<property name="connectionFactory" ref="billingPool" />
<property name="deliveryPersistent" value="true" />
<property name="requestTimeout" value="10000" />
<property name="preserveMessageQos" value="true" />
</bean>
<bean id="billingamq"
class="org.apache.activemq.camel.component.ActiveMQComponent">
<property name="configuration" ref="billingConf" />
</bean>
<bean id="jndiTemplate" class="org.springframework.jndi.JndiTemplate">
<property name="environment">
<props>
<prop
key="java.naming.factory.initial">weblogic.jndi.WLInitialContextFactory</prop>
<prop
key="java.naming.provider.url">t3://localhost:7001
</prop>
<prop
key="java.naming.security.principal">weblogic</prop>
<prop
key="java.naming.security.credentials">weblogic123</prop>
</props>
</property>
</bean>
<bean id="jndiFactoryBean"
class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiName" value="jms.vass.ConnectionFactory" />
<property name="jndiTemplate" ref="jndiTemplate" />
</bean>
<bean id="jndiDestinationResolver"
class="org.springframework.jms.support.destination.JndiDestinationResolver">
<property name="jndiTemplate" ref="jndiTemplate" />
</bean>
<bean id="jmsConfiguration"
class="org.apache.camel.component.jms.JmsConfiguration">
<property name="connectionFactory" ref="jndiFactoryBean" />
<property name="destinationResolver"
ref="jndiDestinationResolver" />
<property name="concurrentConsumers" value="10" />
<property name="transacted" value="true" />
<property name="deliveryPersistent" value="true" />
<property name="requestTimeout" value="10000" />
<property name="cacheLevelName" value="CACHE_CONSUMER" />
</bean>
<bean id="mainamq" class="org.apache.camel.component.jms.JmsComponent">
<property name="configuration" ref="jmsConfiguration" />
</bean>
<camel:camelContext xmlns="http://camel.apache.org/schema/spring">
<camel:route>
<camel:from uri="mainamq:queue:jms.vass.billing.pr.claro.5121006" />
<camel:log message="Sent message jms.vass.billing.pr.claro.5121006."
/>
<camel:to uri="billingamq:queue:jms.vass.billing.pr.claro.5121006"
/>
</camel:route>
<camel:route>
<camel:from uri="mainamq:queue:jms.vass.billing.pr.claro.5121009" />
<camel:log message="Sent message jms.vass.billing.pr.claro.5121009."
/>
<camel:to uri="billingamq:queue:jms.vass.billing.pr.claro.5121009"
/>
</camel:route>
<camel:route>
<camel:from uri="mainamq:queue:jms.vass.billing.pr.claro.5121007" />
<camel:log message="Sent message jms.vass.billing.pr.claro.5121007."
/>
<camel:to uri="billingamq:queue:jms.vass.billing.pr.claro.5121007"
/>
</camel:route>
</camel:camelContext>
</beans>
MY POM
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.cm</groupId>
<artifactId>billing.pr.claro.wl</artifactId>
<version>1.0</version>
<packaging>bundle</packaging>
<name>Billing Peru Claro</name>
<url>http://www.conceptomovil.com</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>
<dependencies>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-core</artifactId>
<version>2.12.3</version>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-spring</artifactId>
<version>2.12.3</version>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-jms</artifactId>
<version>2.12.3</version>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-core</artifactId>
<version>5.7.0</version>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-camel</artifactId>
<version>5.7.0</version>
</dependency>
<dependency>
<groupId>com.oracle</groupId>
<artifactId>wlclient</artifactId>
<version>12.1.2.0</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<version>2.4.0</version>
<configuration>
<instructions>
<Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
<Private-Package>com.cm.vass.routes.*</Private-Package>
<DynamicImport-Package>*</DynamicImport-Package>
</instructions>
</configuration>
</plugin>
</plugins>
</build>
</project>
Thank you guys
--
View this message in context:
http://camel.465427.n5.nabble.com/Cannot-instantiate-class-weblogic-jndi-WLInitialContextFactory-tp5766396.html
Sent from the Camel - Users mailing list archive at Nabble.com.