Cannot compile due to error Error:java: Illegal char <*> at index 7: ../lib/*.jar

Answered

I get the following error when i compile a mave project using JDK 11.0.02 in IDEA Community 2019.2

Cannot compile due to error Error:java: Illegal char <*> at index 7: ../lib/*.jar

Where is some problem with the following dependency below but error message above does not say anything which compile dependency that is the problem ?
HOW DO YOU FIND OUT THE CONFLICTING COMPILE DEPENDENCY ?

<dependency>
<groupId>com.smartbear.soapui</groupId>
<artifactId>soapui</artifactId>
<version>5.5.0</version>
</dependency>

Here is my pom.xml file

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.payex.medipay.steps</groupId>
<artifactId>medipay</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>

<name>medipay</name>
<url>http://maven.apache.org</url>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<repositories>
<repository>
<id>sonatype-snapshots</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>smartbear-repository</id>
<name>smartbear-repository</name>
<url>http://www.soapui.org/repository/maven2</url>
</repository>
</repositories>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>


<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-junit</artifactId>
<version>1.2.5</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-java</artifactId>
<version>1.2.5</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-picocontainer</artifactId>
<version>1.2.5</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
<version>1.3</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.11</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-chrome-driver</artifactId>
<version>3.4.0</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.apache.directory.studio</groupId>
<artifactId>org.apache.commons.io</artifactId>
<version>2.4</version>
</dependency>

<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-support</artifactId>
<version>3.4.0</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20171018</version>

</dependency>

<dependency>
<groupId>com.smartbear.soapui</groupId>
<artifactId>soapui</artifactId>
<version>5.5.0</version>
</dependency>

</dependencies>
</project>

0
7 comments

Could you please provide a demo project, to reproduce a problem?

0
Avatar
Permanently deleted user

In order to reproduce the problem perform the following steps:

1. Create a Maven project

2. Replace the content om the pom.xml with content listed below.and import maven dependencies

3. Create a Main.java with content listed below.

4. Build project

pom.xml

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.payex.medipay.steps</groupId>
<artifactId>medipay</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>

<name>medipay</name>
<url>http://maven.apache.org</url>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<repositories>
<repository>
<id>sonatype-snapshots</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>smartbear-repository</id>
<name>smartbear-repository</name>
<url>http://www.soapui.org/repository/maven2</url>
</repository>
</repositories>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>

<dependencies>
<dependency>
<groupId>com.smartbear.soapui</groupId>
<artifactId>soapui</artifactId>
<version>5.5.0</version>
</dependency>
</dependencies>
</project>

Main.java

package com.test;

import com.eviware.soapui.tools.SoapUITestCaseRunner;

public class Main {

public static void main(String[] args) {

SoapUITestCaseRunner soapUITestCaseRunner = new SoapUITestCaseRunner();

}

}

0

Hi. I have created a project, following the instructions, it works fine for me, could you please provide a project you are having problem with?

0
Avatar
Permanently deleted user

I encountered this problem today , and issue was resolved for me by setting the Project JDK in Project Structure same as jdk in build.gradle file

0
Avatar
Permanently deleted user

I could resolve this issue by going in Project Structure > Libraries and for the entry of the problematic library there was an error entry, which I could delete, and then it worked.

5

Yes, gaetjen's solution worked for me.  I had dozens of jars that had 2 locations for the Classes section.. one was in the C://Program Files/Jetbrain/* dir (that was red underlined / error) and one that was in the <home>/.gradle/* dir (which is correct).  Not sure why IJ was running my Spring Boot app fine (and using the non-error jar classes) but decided to use the error/red-lined jar classes when exporting to a jar.  But once I deleted all of those, I could build a jar.

0

I had this errror with the lib

com.smartbear.soapui 

version 5.2.1.
It was solved by excluding the

com.smartbear.utils.analytics

the finall pom we used :

<dependency>
<groupId>com.smartbear.soapui</groupId>
<artifactId>soapui</artifactId>
<version>5.2.1</version>
<exclusions>
<exclusion>
<groupId>com.smartbear.utils.analytics</groupId>
<artifactId>out-app-analytics-provider</artifactId>
</exclusion>
</exclusions>
</dependency>
0

Please sign in to leave a comment.