1

I am facing a peculiar problem where my java source files just takes too much time to compile.

The Maven debug output at the point the install gets stuck is given below. It takes as much as 10 minutes to compile a single Java file. This was working fine for me until recently.

[DEBUG] Command line options:
[DEBUG] Command line options:
[DEBUG] -d D:\wstest\WSD_COde\WSD\WSD-common\target\classes -classpath D:\wstest\WSD_COde\WSD\WSD-common\target\classes;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\junit-4.8.1.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\log4j-1.2.15.jar;D:\wstest
\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\commons-logging-1.1.1.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\dozer-4.4.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\geronimo-stax-api_1.0_spec-1.0.1.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\axis.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\spring-web-2.5.6.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\spring-aop-2.5.6.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\spring-context-2.5.6.jar;D:\wstest\WSD_COde\WSD\WSD-web\src\main\webapp\WEB-INF\lib\spring-context-support-2.5.6.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\spring-core-2.5.6.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\spring-orm-2.5.6.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\spring-jdbc-2.5.6.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\spring-tx-2.5.6.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\spring-beans-2.5.6.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\spring-jms-2.5.6.jar;D:\wstest\ISD_COde\WSD\WSD-web\src\main\webapp\WEB-INF\lib\hibernate-3.2.6.ga.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\ojdbc14.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\spring-2.5.6.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\commons-lang-2.4.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\spring-webmvc-2.5.6.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\commons-validator-1-1-4.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\spring-modules-validation-0.7.jar;D:\wstest\ISD_COde\WSD\WSD-web\src\main\webapp\WEB-INF\lib\IsbWsdlAxisClientsClasses.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\IsbWsdlAxisClientsResources.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\dom4j-1.6.1.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\commons-beanutils-1.6.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\commons-collections-3.1.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\commons-digester-1.6.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\spring-webmvc-struts.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\axis2-codegen-1.4.1.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\axis2-jaxws-1.4.1.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\axis2-jaxws-api-1.4.1.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\axis2-kernel-1.4.1.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\axis2-xmlbeans-1.4.1.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\spring-binding-2.0-m1.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\xbean.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\antlr-2.7.7.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\axiom-api-1.2.7.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\axiom-impl-1.2.7.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\aspectjrt-1.6.2.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\spring-webflow-2.0-m1.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\poi-3.6-20091214.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\commons-codec-1.4.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\standard-1.0.6.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\spring-test-2.5.6.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\junit-addons-1.4.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\xercesImpl-2.8.1.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\aspectjweaver-1.6.2.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\ehcache-1.5.0.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\aopalliance-1.0.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\asm.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\asm-attrs.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\aspectjrt-1.6.2.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\axiom-api-1.2.7.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\axiom-impl-1.2.7.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\backport-util-concurrent-3.1.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\cglib-2.1.3.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\commons-fileupload-1.2.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\commons-httpclient-3.1.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\eclipselink.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\jakarta-oro-2.0.7.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\jdo2-api-2.0.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\jsr107cache-1.0.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\jstl-1.0.6.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\jt
a.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\mina-core-1.0.1.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\neethi-2.0.4.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\ognl-2.6.9.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\openjpa-1.1.0.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\poi-contrib-3.6-20091214.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\poi-ooxml-3.6-20091214.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\poi-ooxml-schemas-3.6-20091214.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\qpid-client-2.6.0.6.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\qpid-common-2.6.0.6.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\slf4j-api-1.4.0.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\slf4j-log4j12-1.4.0.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\smtp.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\spring-webmvc-portlet-2.5.6.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\testng-5.8-jdk15.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\taglibs-log.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\struts-1.2.9.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\struts-el-1.2.9.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\strutstest-2.1.3.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\activation-1.1.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\annogen-0.1.0.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\axiom-dom-1.2.7.jar;D:\wstest\WSDCode\ISD\WSD-web\src\main\webapp\WEB-INF\lib\axis2-adb-1.4.1.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\axis2-adb-codegen-1.4.1.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\axis2-ant-plugin-1.4.1.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\axis2-clustering-1.4.1.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\axis2-corba-1.4.1.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\axis2-fastinfoset-1.4.1.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\axis2-java2wsdl-1.4.1.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\axis2-jaxbri-1.4.1.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\axis2-jibx-1.4.1.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\axis2-json-1.4.1.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\axis2-jws-api-1.4.1.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\axis2-metadata-1.4.1.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\axis2-mtompolicy-1.4.1.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\axis2-saaj-1.4.1.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\axis2-saaj-api-1.4.1.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\axis2-spring-1.4.1.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\commons-discovery-0.2.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\commons-io-1.4.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\geronimo-annotation_1.0_spec-1.1.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\httpcore-4.0-beta1.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\httpcore-nio-4.0-beta1.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\jalopy-1.5rc3.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\jaxb-api-2.1.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\jaxb-impl-2.1.6.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\jaxb-xjc-2.1.6.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\jaxen-1.1.1.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\jettison-1.0-RC2.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\jibx-bind-1.1.5.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\jibx-run-1.1.5.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\mail-1.4.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\mex-1.4.1.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\soapmonitor-1.4.1.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\woden-api-1.0M8.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\woden-impl-dom-1.0M8.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\wstx-asl-3.2.4.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\xmlbeans-2.3.0.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\jaxrpc.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\j2ee-1.4.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\commonj-twm.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\wsdl4j-1.6.2.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\XmlSchema-1.4.2.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\foo-commonj.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\concurrent.jar;D:\wstest\WSDCode\WSD\WSD-web\src\main\webapp\WEB-INF\lib\ant-1.6.5.jar; -sourcepath D:\wstest\WSDCode\WSD\WSD-common\src\main\java; D:\wstest\WSDCode\WSD\WSD-common\src\main\java\com\wsfiles\WSD\common\constants\WsConstants.java D:\wstest\WSDCode\WSD\WSD-common\src\main\java\com\wsfiles\WSD\common\util\WSSortComparator.java -g -nowarn -target 1.5 -source 1.5 -encoding UTF-8
[INFO] **Compiling 2 source files to D:\wstest\WSDCode\WSD\WSD-common\target\classes**
ArunM
  • 2,274
  • 3
  • 25
  • 47
  • 1
    You have a huge classpath. These are all necessary? Also which are the classes you want to compile. A large generated java class (wsdl - axis)? – asgoth Jan 02 '13 at 08:24
  • I am not sure which are the necessary ones here as this is a pom file which has been in use for a long time. The classes I want to compile are some business logic which are not at all huge files.The thing is this was working fine and seems to have gone bad suddenly. – ArunM Jan 02 '13 at 08:32
  • You could try to create a new project with only those two files and only the dependencies they need. See if it solves the problem. Also, Windows (NTFS) is slower when it is about file access and in your case there are lots of files to access. – asgoth Jan 02 '13 at 08:40
  • I suspect you are waiting for something on your network, or more likely the internet. e.g. do you have a URL which times out. – Peter Lawrey Jan 02 '13 at 09:59
  • 1
    does an offline maven build pose the same problem? – dinukadev Jan 02 '13 at 10:16
  • Offline maven build also had the same problem. Since as per debug the install seems to be stuck at javac this would be as expected. – ArunM Jan 04 '13 at 11:00

1 Answers1

0

If you already taken a look into the debug output based on your output you've seen that Maven will do nothing else than calling the command line javac compiler so what should be faster? The problem are your classes which i assume are being generated and really large (10 minutes?)

khmarbaise
  • 92,914
  • 28
  • 189
  • 235
  • The classes that are generated are just oridnary business logic files. I agree with your suggestion that this seems to be a javac problem but really dont have a clue how to pinpoint the exact problem. I can try for a javac reinstall to see if this will fix. – ArunM Jan 02 '13 at 08:34
  • 2
    Have you tried to create just a web service module which is used to generate and compile the Axis2 relevant classes? You'd just have to package the war again and could skip the compilation part. – Florian Salihovic Jan 02 '13 at 09:43
  • http://stackoverflow.com/questions/686545/why-is-javac-1-5-running-so-slowly-compared-with-the-eclipse-compiler?rq=1 .. Please refer to this link here. Since my compiler version is jdk1.6.0_22 and everybody else seems to be suing jdk1.6.0_29, I switched over to this version and this seems to have resolved the issue for now. Now the install completes in 3 minutes as compared to the one hour that was seen earlier. However the original issue was also seen to be intermittent so I am not sure if this will solve this. – ArunM Jan 04 '13 at 11:04
  • Switching the KDK didnt help for me.As per the link given here this is a problem in JDK 1.6.http://bugs.sun.com/view_bug.do?bug_id=6843751.I am going to install JDK 1.5 to see if that will resove the problem. – ArunM Jan 09 '13 at 10:17
  • I am now doing the compile using eclise m2e and this is resolving the issue. I am inclined to think that this is happening because of the JDK 1.6 problem that I have mentioned in the above comment. However what is the fix for this problem ? – ArunM Jan 22 '13 at 12:35