Skip to Content
0

error: package com.sap.conn.jco does not exist during compilation in jersey project

Jan 15 at 08:58 AM

120

avatar image
Former Member

I am running a java jersey maven webservice on Eclipse and I need to use the SAP Java Conector to connect to an SAP system. I have added the PATH and CLASSPATH variables correctly and added the sapjco3.jar to the project as an external Jar and I am getting no errors in Markers. Only during compilation in maven install, I get this error for all sapjco imports:

error: package com.sap.conn.jco does not exist.

Am I missing something?

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Richard Zhao
Jan 15 at 10:07 AM
1

Hello, Mohanad. This issue is cause Maven cannot find this jar file in your local Maven repository.

You could try to fix it by following steps:

1. Install sapjco3.jar to the local Maven repository.

mvn install:install-file -Dfile=sapjco3.jar -DgroupId=com.sap -DartifactId=sapjco3 -Dversion=0.0.1 -Dpackaging=jar

2. Add new dependency in the pom.xml

<dependency>  
      <groupId>com.sap</groupId>  
      <artifactId>sapjco3</artifactId>  
      <version>0.0.1</version>  
</dependency> 

Share
10 |10000 characters needed characters left characters exceeded