1
votes
[INFO]  .................................................. SUCCESS [1.166s]
[INFO] aopencommon .................................... FAILURE [3.797s]

[INFO] abbuclt ............................ SKIPPED .......................... etc all others skipped and error below appears [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2. 3.2:compile (default-compile) on project aopencommon: Compilation failure: Co mpilation failure: [ERROR] \Users\ds\Desktop\MYWORKSPACES2\atime\common-jar\src\main\jav a\com\ax\id\atec_business_1\ABunes.java:[46,8] cannot find sy mbol [ERROR] symbol : constructor Service(java.net.URL,javax.xml.namespace.QName,jav ax.xml.ws.WebServiceFeature[]) [ERROR] location: class javax.xml.ws.Service ............................................................ etc..

http://maven.apache.org/maven-v4_0_0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 4.0.0 com.acm.ax aopenall pom 0.0.1-SNAPSHOT

<modules>
  <module>abusjb-jar</module>
  <module>abusear</module>
  <module>aconejb-jar</module>
  <module>aconear</module>
    <module>common-jar</module>
    <module>rerouteservlet-war</module>
    <module>homevalejb-jar</module>
    <module>homevalear</module>
    <module>smallbusejb-jar</module>
    <module>smallbusear</module>
    <module>canbusejb-jar</module>
    <module>canbusear</module>
    <module>canconejb-jar</module>
    <module>canconear</module>
    <module>iscrejb-jar</module>
    <module>iscrear</module>
    <module>informaticaclientejb-jar</module>
    <module>informaticaclientear</module>
    <module>instantauditejb-jar</module>
    <module>instantauditear</module>
    <module>batchlookupservlets-war</module>
    <module>batchlookupejb-jar</module>
    <module>batchlookupear</module>
</modules>

below is from comman-jar project pom.xml

http://maven.apache.org/maven-v4_0_0.xsd"> aopenall com.acm.ax 0.0.1-SNAPSHOT 4.0.0 com.acm.ax aopencommon jar 0.0.1-SNAPSHOT aopencommon

<dependency>
  <groupId>javax.xml</groupId>
  <artifactId>jaxrpc-api</artifactId>
  <version>1.1</version>
  <scope>provided</scope>
</dependency>
<dependency>
  <groupId>org.jboss.jbossws</groupId>
  <artifactId>jbossws-native-core</artifactId>
  <version>3.1.1.GA</version>
  <scope>provided</scope>
</dependency>
  <dependency>
  <groupId>com.sun.xml.ws</groupId>
  <artifactId>jaxws-rt</artifactId>
  <version>2.2</version>
  <scope>provided</scope>
  <exclusions>
    <exclusion>
      <groupId>com.sun.istack</groupId>        
        <artifactId>istack-commons-runtime</artifactId>      
        </exclusion>
  </exclusions>
</dependency>

  <dependency>
        <groupId>javax.persistence</groupId>
        <artifactId>persistence-api</artifactId>
        <version>1.0</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-core</artifactId>
        <version>3.6.0.Final</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>3.8.1</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>log4j</groupId>
        <artifactId>log4j</artifactId>
        <version>1.2.16</version>
        <scope>provided</scope>
</dependency>
</dependencies>

3
Hi, can you give some information about what happened before that error message occurred? - acutesoftware
first time I run mvn clean install (created .m2) then I got error below: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2. 3.2:compile (default-compile) on project aopencommon: Compilation failure: Compilation failure: [ERROR]\Users\dsozer\Desktop\MYWORKSPACES\aRtC611\common-jar\src \main\java\com\a\id\a_bu_1\ABu.java:[46,8] cannot find symbol [ERROR] symbol : constructor Service(java.net.URL,javax.xml.namespace.QName,jav ax.xml.ws.WebServiceFeature[]) [ERROR] location: class javax.xml.ws.Service errors continue.. - docaUS
my settings are echo %JAVA_HOME% C:\Program Files\Java\jdk1.6.0_45 and maven version apache-maven-3.0.5 - docaUS
i did some research and tried to added <plugins> <plugin> <artifactId>maven-compiler- plugin</artifactId> <configuration> <source>1.6</source> <target>1.6</target> </configuration> </plugin> </plugins> it did not worked then i download the maven-compiler-plugin-2.3.2.jar and tried to install it installed successfully ,then i run mvn clean install and got the error in my first post. not sure whats is going on . - docaUS
I also installed 3.1 version of that jar and tried clean install again but did not work either. any help will be appreciated. - docaUS

3 Answers

0
votes

try to compile with java 7 or use maven-compiler-plugin-2.1.1 instead

Edit: add to your pom file to override the default compilation

<defaultOptions>
<extraargs>
    <extraarg>-frontend</extraarg>
    <extraarg>jaxws21</extraarg>
</extraargs>

https://stackoverflow.com/a/17651644/2593751

0
votes

See if you have installed the jdk for that go to: -> Java Build Path -> Libraries If not, download and install it and add it on Add Library -> JRE System Library -> Alternate JRE: installed JREs -> Add -> Standard VM -> next -> Directory In my case the path is: /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.75-2.5.4.2.fc20.x86_64

0
votes

For anyone coming here today: For me the issue was that the environment variable JAVA_HOME was not set. You have to set it to your sdk installation

How to do that (assuming you have a jdk installed):

  1. Win + Pausekey
  2. Click on "Advanced" on the left
  3. Click the "Environment Variables" button
  4. set or create a variable with the name JAVA_HOME and set it's value accordingly - usually something like C:\Program Files\Java\jdk1.8.0_131