cancel
Showing results for 
Search instead for 
Did you mean: 

JRA connector in NetWeaver 7.3 : java.lang.NoClassDefFoundError: javax/resource/cci/Connection

0 Kudos

Hi,

I'm trying to deploy a project very similar to the one described at http://scn.sap.com/community/open-source/blog/2012/05/01/nw-73-spring-31-jsf-20-primefaces-part-1 and http://scn.sap.com/community/open-source/blog/2012/05/02/nw-73-spring-31-jsf-20-and-primefaces-part-....

The idea is use a JRA configured connector to get BAPI access to SAP data.

Unfortunately, when trying to deploy the application I get the error below:

Warning occurred on server 4392650 during startApp of test.com/disti~portal : com.sap.ASJ.web.000607 (Failed in component: test.com/disti~portal, ) Initialization of servlet [mvc-dispatcher] failed. Check init() method of servlet. Error is: [org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jraManagerBean': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.test.disti.dao.CustomerDAO com.arm.disti.ejb.JraManagerBean.dao; nested exception is java.lang.NoClassDefFoundError: javax/resource/cci/Connection]

The application application-j2ee-engine.xml is described below. I guess I'm missing some runtime reference to those classes ? At compile time, I'm using a connector.jar library I found at NWDS locally (If I try to deploy this jar with my project I get java.lang.ClassCastException: class com.sap.mw.jco.jra.JRA$ConnectionFactoryImpl:sap.com/tc~sapjra~temp@com.sap.engine.boot.loader.ResourceMultiParentClassLoader@6e4715da@alive incompatible with interface javax.resource.cci.ConnectionFactory:library:keytree.co.uk~ec~java~disti~portal~libs@com.sap.engine.boot.loader.ResourceMultiParentClassLoader@6e57e2bc@alive)

I have searched in this forum for days (and also in the internet) but no solution... The only thing I found is that the DC level, there is a connector package (see image), but I cannot successfully reference it.

Anyone can help please ?

Thanks !

Alan Rubin

<?xml version="1.0" encoding="UTF-8"?>

<application-j2ee-engine xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="application-j2ee-engine.xsd">

    <reference reference-type="hard" prepend="true">

        <reference-target provider-name="keytree.co.uk" target-type="library">ec~java~arm~portal~libs</reference-target>

    </reference>

    <reference reference-type="hard">

           <reference-target provider-name="sap.com" target-type="application">tc~bl~jra~api</reference-target>

    </reference>

    <reference reference-type="weak">

           <reference-target provider-name="sap.com" target-type="service">connector</reference-target>

    </reference>

    <reference reference-type="hard">

           <reference-target provider-name="sap.com" target-type="library">tc~bl~jco~api</reference-target>

    </reference>

</application-j2ee-engine>

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi,

Solved that. Together with the application ear I'm also deploying a heavy library ear package which I'm referencing from my application. This due to issues with class loading and Spring+Jersey libraries.

The problem was that at this heavy library ear package was missing the runtime references. So I have added them as described below.

Cheers,

Alan

File server/provider.xml in heavy resource loader package at  http://scn.sap.com/community/open-source/blog/2012/05/02/nw-73-spring-31-jsf-20-and-primefaces-part-...

<?xml version="1.0"?>

<provider-descriptor>

    <display-name>ec~java~portal~libs</display-name>

    <component-name>ec~java~portal~libs</component-name>

    <major-version>1</major-version>

    <minor-version>0</minor-version>

    <micro-version>0</micro-version>

    <provider-name>mycompany.co.uk</provider-name>

    <references>

        <reference type="library" strength="hard" provider-name="sap.com">engine.jee5.facade</reference>

        <reference type="library" strength="hard" provider-name="sap.com">engine.javax.facade</reference>

    </references>

    <jars>

        <jar-name>lib/activation-1.1.jar</jar-name>

        <jar-name>lib/aopalliance-1.0.jar</jar-name>

        <jar-name>lib/asm-3.1.jar</jar-name>

        <jar-name>lib/commons-logging-1.1.1.jar</jar-name>

        <jar-name>lib/jackson-core-asl-1.9.8.jar</jar-name>

        <jar-name>lib/jackson-jaxrs-1.9.2.jar</jar-name>

        <jar-name>lib/jackson-mapper-asl-1.9.8.jar</jar-name>

        <jar-name>lib/jackson-xc-1.9.2.jar</jar-name>

        <jar-name>lib/jaxb-api-2.2.2.jar</jar-name>

        <jar-name>lib/jaxb-impl-2.2.3-1.jar</jar-name>

        <jar-name>lib/jersey-core-1.13.jar</jar-name>

        <jar-name>lib/jersey-json-1.13.jar</jar-name>

        <jar-name>lib/jersey-server-1.13.jar</jar-name>

        <jar-name>lib/jersey-servlet-1.13.jar</jar-name>

        <jar-name>lib/jersey-spring-1.13.jar</jar-name>

        <jar-name>lib/jettison-1.1.jar</jar-name>

        <jar-name>lib/spring-aop-3.1.0.RELEASE.jar</jar-name>

        <jar-name>lib/spring-asm-3.1.0.RELEASE.jar</jar-name>

        <jar-name>lib/spring-beans-3.1.0.RELEASE.jar</jar-name>

        <jar-name>lib/spring-context-3.1.0.RELEASE.jar</jar-name>

        <jar-name>lib/spring-context-support-3.1.0.RELEASE.jar</jar-name>

        <jar-name>lib/spring-core-3.1.0.RELEASE.jar</jar-name>

        <jar-name>lib/spring-expression-3.1.0.RELEASE.jar</jar-name>

        <jar-name>lib/spring-tx-3.1.0.RELEASE.jar</jar-name>

        <jar-name>lib/spring-web-3.1.0.RELEASE.jar</jar-name>

        <jar-name>lib/spring-webmvc-3.1.0.RELEASE.jar</jar-name>

        <jar-name>lib/cglib-2.2.jar</jar-name>

        <jar-name>lib/stax-api-1.0-2.jar</jar-name>

        <jar-name>lib/stax-api-1.0.1.jar</jar-name>

        <jar-name>lib/guava-r09.jar</jar-name>

        <jar-name>lib/jsr305-1.3.9.jar</jar-name>

        <jar-name>lib/owasp-java-html-sanitizer-r117.jar</jar-name>

    </jars>

</provider-descriptor>

Answers (0)