You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by sreeraaman <sr...@gmail.com> on 2012/07/11 14:36:59 UTC
Unable to install jndi feature in Karaf 3.0.0-SNAPSHOT
Dear All,
I just downloaded the Karaf 3.0.0-SNAPSHOT
(file:///home/sreeraaman/Downloads/apache-karaf-3.0.0-20120629.050006-336.tar.gz).
After starting Karaf, I tried installing the jndi features as follows:
feature:install jndi
and Karaf throws the following exception:
Error executing command: Error resolving artifact
org.apache.aries.jndi:org.apache.aries.jndi.api:jar:1.0.0-SNAPSHOT.
I believe only version 1.0.0 is available in maven repo.
http://search.maven.org/#search%7Cga%7C1%7Corg.apache.aries.jndi.api
Should I configure some custom repositories to get the above bundle?
best regards
Sriraman.
--
View this message in context: http://karaf.922171.n3.nabble.com/Unable-to-install-jndi-feature-in-Karaf-3-0-0-SNAPSHOT-tp4025193.html
Sent from the Karaf - User mailing list archive at Nabble.com.
Re: Unable to install jndi feature in Karaf 3.0.0-SNAPSHOT
Posted by sreeraaman <sr...@gmail.com>.
BTW, I have hit the bug ARIES-796 which is a kind of show stopper for us in
proceeding further.
https://issues.apache.org/jira/browse/ARIES-796.
I guess it is fixed in version 0.4. However, the karaf enterprise feature as
part of karaf-2.2.8 bundles only 0.3.2. Any idea how I can work around this
bug?
My requirement is something like this.
I have a bean which executes a named jpql or native sql. The query names
along with other parameters like whether it is a jpql or a native sql and
the result type (single or list) is passed on to this bean from a camel
route via the exchange in headers and the bean is invoked via bean binding.
Inside the camel route, I set the exchange headers by retrieving the values
from a configuration file.
The contents of the blueprint xml is as follows:
<cm:property-placeholder
persistent-id="businessservices.accountsummary"></cm:property-placeholder>
<bean id="dbSelectService" class="jpa.utils.DBSelectService">
<tx:transaction method="*" />
<jpa:context property="entityManager" unitname="test"/>
</bean>
I invoke the bean as follows:
from("direct:getaccountsummary").routeId("accountsummary").autoStartup(true)
.process(new AccountSummaryPreProcessor())
.to("bean:dbSelectService?method=processRequest")
The AccountSummaryPreProcessor is where I retrieve the values (named query
name,whether native or not and whether the result is a list or a single
result) as follows:
exchange.in.headers.put("NAMED.QUERY.NAME",
exchange.context.resolvePropertyPlaceholders("{{accountsummary.namedquery.name}}"))
exchange.in.headers.put("NAMED.QUERY.ISNATIVE",
exchange.context.resolvePropertyPlaceholders("{{accountsummary.namedquery.isnative}}"))
exchange.in.headers.put("NAMED.QUERY.RESULT.TYPE",
exchange.context.resolvePropertyPlaceholders("{{accountsummary.namedquery.result.type}}"))
I guess the problem is when I try to use the cm:property-placeholder in
conjunction with the jpa:context is when I hit the bug.
Is there a way where I can retrieve the entityManager from jndi and use a
reference instead of jpa:context to work around this bug?
I know how to inject a entitymanagerfactory as follows:
<reference id="entityManagerFactory"
interface="javax.persistence.EntityManagerFactory"
filter="(osgi.unit.name=test)" />
However, I am using a JTA Transaction manager.
Not too sure if I can make a call to the
entityManagerFactory.createEntityManager() in this case.
best regards
Sriraman.
--
View this message in context: http://karaf.922171.n3.nabble.com/Unable-to-install-jndi-feature-in-Karaf-3-0-0-SNAPSHOT-tp4025193p4025197.html
Sent from the Karaf - User mailing list archive at Nabble.com.
Re: Unable to install jndi feature in Karaf 3.0.0-SNAPSHOT
Posted by sreeraaman <sr...@gmail.com>.
Thanks for the quick update.
best regards
Sriraman.
--
View this message in context: http://karaf.922171.n3.nabble.com/Unable-to-install-jndi-feature-in-Karaf-3-0-0-SNAPSHOT-tp4025193p4025195.html
Sent from the Karaf - User mailing list archive at Nabble.com.
Re: Unable to install jndi feature in Karaf 3.0.0-SNAPSHOT
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi,
yes, it's a known issue as the Aries SNAPSHOT are not available on
repository.apache.org.
We are heading to upgrade to the 1.0.0 released version.
Waiting this, I will check to deploy Aries SNAPSHOT.
Regards
JB
On 07/11/2012 02:36 PM, sreeraaman wrote:
> Dear All,
>
> I just downloaded the Karaf 3.0.0-SNAPSHOT
> (file:///home/sreeraaman/Downloads/apache-karaf-3.0.0-20120629.050006-336.tar.gz).
> After starting Karaf, I tried installing the jndi features as follows:
>
> feature:install jndi
>
> and Karaf throws the following exception:
>
> Error executing command: Error resolving artifact
> org.apache.aries.jndi:org.apache.aries.jndi.api:jar:1.0.0-SNAPSHOT.
>
> I believe only version 1.0.0 is available in maven repo.
>
> http://search.maven.org/#search%7Cga%7C1%7Corg.apache.aries.jndi.api
>
> Should I configure some custom repositories to get the above bundle?
>
> best regards
> Sriraman.
>
>
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/Unable-to-install-jndi-feature-in-Karaf-3-0-0-SNAPSHOT-tp4025193.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>
--
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com