cancel
Showing results for 
Search instead for 
Did you mean: 

Access to CloudConnector via Spring Boot

06-01-2017 3:15 PM
detrapto Explorer
1356 views 4 comments Go to solution
0 Likes
SAP Managed Tags
Subscribe

Hi,

I'm trying to access an on-premise endpoint from SAP Cloud Platform (NEO). It's working fine in general when having the ConnectivityConfiguration listed in web.xml.

We want to use Spring Boot for all our Java Apps and since it is not possible to use the web.xml, I'm not getting the ConnectivityConfiguration.

Already tried several ways to register the ConnectivityConfiguration for being able to get it via JNDI, but nothing worked until now. Any suggestions/solutions?

Thanks in advance!

0 Likes

Accepted Solutions (1)

Accepted Solutions (1)

detrapto
Explorer
0 Likes

Yeehaw!

Sounds pretty strange, but for me, the following finally worked:

Instead of following Spring Boot's convention to but all the resources in Mavens "/resources/static", the context.xml with the Resource definitions MUST be in "/webapps/META-INF". I also tries "/resources/META-INF", "/resources/static/META-INF" and everything I could imagine inside the code, but finally, it seemed to be only the location of "context.xml"...

Answers (3)

Answers (3)

former_member182374
Active Contributor
0 Likes

Hi Tobias,

Can you please publish your context.xml? I'm having the exact same issue...

Thanks,

Omri

detrapto
Explorer
0 Likes

Hi Nikolai,

thanks for your proposal, but my problem is, that the Resource itself is not known to my context.

So @Resource ends up in a MissingBean Exception and instead of "Name [connectivityConfiguration] is not bound in this Context" that I got before.

So the core problem is how to tell my environment to provide the ConnectivityConfiguration.

Did you manage to do that already?

nikolai_tankov
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi ,

You can try to use JavaEE @Resource annotation and specify in this annotation the same properties that are specified in the resource-ref in the web.xml.

Best regards,

Nikolai.