Sunday, March 16, 2014

my diary of resolutions

  • I run offline artifactory server which acts like maven repository.From time to time I get this error.

Eclipse Kepler Problems view tab


Description    Resource    Path    Location    Type
ArtifactDescriptorException: Failed to read artifact descriptor for org.apache.tomcat:el-api:jar:6.0.32: ArtifactResolutionException: Failure to transfer org.apache.tomcat:el-api:pom:6.0.32 from http://localhost:5555/artifactory/libs-release was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.apache.tomcat:el-api:pom:6.0.32 from/to central (http://localhost:5555/artifactory/libs-release): Connection refused: no further information to http://localhost:5555/artifactory/libs-release/org/apache/tomcat/el-api/6.0.32/el-api-6.0.32.pom    pom.xml    /simple-parent    line 1    Maven Dependency Problem

Normally you see many errors in problems view.This is just one of them.To resolve this

right click on the project.Maven-Update Project



My guess is that if you run eclipse first when artifactory server is shut down you get this problem.


  • c3p0 problem 
This is what I get eclipse console view.

2014-03-16 22:42:10 DEBUG C3P0PooledConnectionPool:468 - Preparing to destroy PooledConnection: com.mchange.v2.c3p0.impl.NewPooledConnection@17c0756
2014-03-16 22:42:10 DEBUG NewPooledConnection:566 - com.mchange.v2.c3p0.impl.NewPooledConnection@17c0756 closed by a client.
java.lang.Exception: DEBUG -- CLOSE BY CLIENT STACK TRACE
    at com.mchange.v2.c3p0.impl.NewPooledConnection.close(NewPooledConnection.java:566)
    at com.mchange.v2.c3p0.impl.NewPooledConnection.close(NewPooledConnection.java:234)
    at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.destroyResource(C3P0PooledConnectionPool.java:470)
    at com.mchange.v2.resourcepool.BasicResourcePool$1DestroyResourceTask.run(BasicResourcePool.java:964)
    at com.mchange.v2.resourcepool.BasicResourcePool.destroyResource(BasicResourcePool.java:989)
    at com.mchange.v2.resourcepool.BasicResourcePool.access$100(BasicResourcePool.java:32)
    at com.mchange.v2.resourcepool.BasicResourcePool$5.run(BasicResourcePool.java:1174)


in applicationContext.cml

<bean id="MyDataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close">

resolution

<bean id="MyDataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource" >

I don't exactly know why.When I browse class path I couldn't find destroy method.



  • maven project error which is on eclipse luna

[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?

Window > Preferences > Java > Installed JREs >Execution Environments > JavaSE-1.8
Project > Right Click > Maven > Update Project


  • ArtifactTransferException: Failure to transfer

If you get this error message starting with this you can trace the failing jar or dependency file on local folder below.This path is a generic one for hibernate

C:\Users\user1\.m2\repository\org\hibernate\hibernate-core

Remove folder or back up just in case you need.Update project via eclipse with m2eclipse

  • This happens when you configure project while artifactory is not running


C:\Users\yeniceri\.m2\repository\org\apache\maven\plugins\maven-war-plugin

Delete 2.4
Update project to sync with artifactory

  • Index downloads are disabled, search result may be incomplete.

#1
Windows > Preferences > Maven
check the box
"Download repository index updates on startup"
"Download Artifact Sources"

#2
Window > Show View > Other > Maven > Maven Repositories
central repository in 'Global Repositories'
Tick 'Full Index Enabled' and then 'Rebuild Index'

http://stackoverflow.com/questions/24252256/how-to-enable-index-downloads-in-eclipse-for-maven-search


  • -Dmaven.multiModuleProjectDirectory system property is not set.Check $M2_HOME environment variable and mvn script match.

apache-maven-3.3.1
java: 1.8.0_31
eclipse luna

Window-> Preference -> Java -> Installed JREs -> Edit
Default VM arguments
-Dmaven.multiModuleProjectDirectory=$M2_HOME

http://stackoverflow.com/questions/29330577/maven-3-3-1-eclipse-dmaven-multimoduleprojectdirectory-system-propery-is-not-s