cancel
Showing results for 
Search instead for 
Did you mean: 

Use of Jco3 within JEE Application

jochen_willeke
Explorer
0 Kudos

Hi together,

just now I am working on a JEE Application which shall run on Netweaver AS JAVA 7.3 and shall connect to different Netweaver AS ABAP. I have already managed to write a "normal" Java Application, which utilizes the Jco3-Libraries and connects to the ABAP just fine.

When I try to create similar classes within in an existing JEE project and add the sapjco3.jar into the project's lib folder and add it to the build path and deploy it onto the Netweaver AS JAVA the JEE-app does not work. Calling the JEE app will end in the browser freezing and the whole Netweaver seems to be unusable as well.

I already did some research and it seems, that Jco is already part of Netweaver AS Java, and I do not need to add the sapjco3.jar. But how to use the integrated Jco3?

If I just remove the sapjco3.jar from my project, calling a JSP (which uses JCo), will give me an error with missing class definitions and such.

Would be glad to get any ideas or maybe some snippet of working code.

Thanks so much in advance and have a nice weekend,

Jochen

Accepted Solutions (1)

Accepted Solutions (1)

jpenninkhof
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Jochen,

When applications are running on the Netweaver Java AS, they are expected not to directly invoke the JCO classes, but utilize the destinations instead. Destinations can be managed using the netweaver administrator (nwa) and will simplify connection management.

If you scroll down on the page page below, you will find a few good code snippets to get you started with the destination service. It will also show you how to use the JCO library once you have your destination.

http://help.sap.com/saphelp_nw73/helpdata/en/17/d609b48ea5f748b47c0f32be265935/content.htm?frameset=...

Just a note: you will of course have to pull the SAP libraries into your project to get this running. You can't just deploy a war without these references. You can only deploy war files that have no references to SAP libraries. If you want to use SAP libraries in your project, you will have to use the Netweaver Developer Studio and create a software component with references to these libraries. In your software component you will have to create a development component, which basically resembles your war project.

Hope this helps Jochen. Good luck!

Answers (1)

Answers (1)

hofmann
Active Contributor
0 Kudos

You should try to use JCA (http://help.sap.com/saphelp_nw04/helpdata/en/6e/15d240c2c28531e10000000a1550b0/content.htm)

This allows you to connect to any EIS, like SAP ERP.