Special JDK for inspections

I got the message:

The JDK is not configured properly for this project. Inspection cannot proceed.

Do I need a special JDK or some special parameters for it to do inspections?

--Tim

13 comments
Comment actions Permalink

Hello Tim,

It can be if :
1. your .ipr file doesn't contain a JDK link
2. you have JDK link in .ipr but there is no JDK_HOME property defined.

To set up some special jdk you have to specify -Didea.jdk.$JDK_NAME$=$SOME_PATH$
in VM parameters Where JDK_NAME is the name of JDK link from .ipr file.

Thank you

-


Anna Kozlova
JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

I got the message:

The JDK is not configured properly for this project. Inspection cannot
proceed.

Do I need a special JDK or some special parameters for it to do
inspections?

--Tim



0
Comment actions Permalink

Okay. This is running on a machine and under a user where IDEA doesn't (hasn't) been run. So there are no values to match for global locations of JDKs.

I tried to use the method you mention to try and get a JDK to the inspections process, but am not having any luck. I'd think that it would somehow be able to just go ahead and use the one I have for TeamCity.

The Inspections build looks like it might be nice, but it looks awfully tricky to set up. And per my earlier message, we don't check in .ipr/.iml files into their proper locations to avoid overwriting them accidently, and so I've had to manually do a build in the work directory of the build agent to get them into place and am now trying to pass it the JDK information with no success. Hopefully this will get a little easier to setup before release.

--Tim

0
Comment actions Permalink

Hello Tim,

Unfortunatelly, we provide inspections over 'runnable' idea projects only.

Anyway we will try to improve set up process.

Thank you
-


Anna Kozlova
JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

Okay. This is running on a machine and under a user where IDEA doesn't
(hasn't) been run. So there are no values to match for global
locations of JDKs.

I tried to use the method you mention to try and get a JDK to the
inspections process, but am not having any luck. I'd think that it
would somehow be able to just go ahead and use the one I have for
TeamCity.

The Inspections build looks like it might be nice, but it looks
awfully tricky to set up. And per my earlier message, we don't check
in .ipr/.iml files into their proper locations to avoid overwriting
them accidently, and so I've had to manually do a build in the work
directory of the build agent to get them into place and am now trying
to pass it the JDK information with no success. Hopefully this will
get a little easier to setup before release.

--Tim



0
Comment actions Permalink

I've got stuck with this issue too.

I've attempted to set the property as you suggested, but it hasn't helped.

Build log contains:
Process output (last 30 lines): D:\dev\Java\jdk1.5.0_06\bin\java.exe -Dbuild.working.dir=c:\builda~1\work\rating -Didea.build.server.checkout.on.server=true -Didea.jdk.1_5=D:\dev\Java\jdk1.5.0_06 -DDotNetFramework1.1_Path=C:\WINNT\Microsoft.NET\Framework\v1.1.4322 -Dbuild.number=9 -DDotNetFramework1.1= -Duser.language=en -Duser.country=CA -Didea.build.server.buildType.id=bt4 -Dos.version=5.0 -Duser.timezone=America/New_York -Dfile.encoding=Cp1252 -Dfile.separator=\ -DDotNetFramework2.0_Path=C:\WINNT\Microsoft.NET\Framework\v2.0.50727 -Dos.arch=x86 -Djdk.1.5=D:\dev\Java\jdk1.5.0_06 -DDotNetFramework2.0= -Didea.plugins.path=C:\BuildAgent\plugins\idea\plugins -Duser.name=SYSTEM "-Dos.name=Windows 2000" -Didea.build.server.is.personal=false -Didea.build.agent.port=9090 -DDotNetFramework1.0= -Didea.system.path=C:\BuildAgent\work\rating\system -Didea.build.server.run.type=Inspection -Didea.config.path=C:\BuildAgent\work\rating\config -Duser.variant= -Didea.build.server.execution.timeout=0 -Didea.build.server.project.name=rating -Dsuccessful.build.number=8 -Didea.home.path=C:\BuildAgent\plugins\idea "-Duser.home=C:\Documents and Settings\Default User" -Didea.build.server.build.id=29 -Dpath.separator=; -Demma.disable.source=true -DDotNetFramework1.0_Path=C:\WINNT\Microsoft.NET\Framework\v1.0.3705 -Xbootclasspath/p:C:\BuildAgent\plugins\idea\lib\boot.jar -classpath D:\dev\Java\jdk1.5.0_06\lib\tools.jar;C:\BuildAgent\plugins\idea\lib\idea.jar;C:\BuildAgent\plugins\idea\lib\extensions.jar;C:\BuildAgent\plugins\idea\lib\openapi.jar;C:\BuildAgent\plugins\idea\lib\jdom.jar;C:\BuildAgent\plugins\idea\lib\log4j.jar com.intellij.idea.Main inspect C:\BuildAgent\work\rating\rating.ipr profile C:\WINNT\Temp\inspection45547result -e The JDK is not configured properly for this project. Inspection cannot proceed.

Relevant (I think) piece of .ipr file:
<component name="ProjectRootManager" version="2" assert-keyword="true" jdk-15="true" project-jdk-name="1_5" project-jdk-type="JavaSDK" />

Is there something obvious I'm missing?

A minor suggestion for improvement would be to have the error message explicitly say what property could be set to help it find the JDK.

In any case, the inspection build is what most excited me about TeamCity, so I'm hoping I can get this to work.

0
Comment actions Permalink

Hmm, I happened to restart the server, and now the build works!

0
Comment actions Permalink

I've got to the completely same problem. I was so desperate that I even set up three different properties (1.4, jdk.1.4 and idea.jdk.1.4) but neither helped!!
This is the last sentence in build log:

+Inspection output (last 30 lines): c:\Java\JetBrains\TeamCity\jre\bin\java.exe -Dbuild.working.dir=c:\java\jetbra1\teamcity\builda1\work\Assertion_Editor -Didea.build.server.checkout.on.server=true -Dbuild.number=5 -Duser.language=en -Duser.country=US -Didea.build.server.buildType.id=bt2 -Dos.version=5.1 -Duser.timezone=Asia/Bangkok -Dfile.encoding=Cp1252 -Dfile.separator=\ -Dos.arch=x86 -Didea.no.jdk.check=true -Djdk.1.4=c:\j2sdk1.4.2_10 -Didea.plugins.path=C:\Java\JetBrains\TeamCity\buildAgent\plugins\idea\plugins -Duser.name=SYSTEM "-Dos.name=Windows XP" -Didea.build.server.is.personal=false -Didea.build.agent.port=9090 -Didea.system.path=C:\Java\JetBrains\TeamCity\buildAgent\work\Assertion_Editor\system -D1.4=c:\j2sdk1.4.2_10 -Didea.build.server.run.type=Inspection -Didea.config.path=C:\Java\JetBrains\TeamCity\buildAgent\work\Assertion_Editor\config -Didea.jdk.1.4=c:\j2sdk1.4.2_10 -Duser.variant= -Didea.build.server.execution.timeout=0 "-Didea.build.server.project.name=Assertion Editor" -Dsuccessful.build.number=1 -Didea.home.path=C:\Java\JetBrains\TeamCity\buildAgent\plugins\idea -Duser.home=C:\ -Didea.build.server.build.id=40 -Dpath.separator=; -Demma.disable.source=true -Xbootclasspath/p:C:\Java\JetBrains\TeamCity\buildAgent\plugins\idea\lib\boot.jar -classpath C:\Java\JetBrains\TeamCity\jre\lib\tools.jar;C:\Java\JetBrains\TeamCity\buildAgent\plugins\idea\lib\idea.jar;C:\Java\JetBrains\TeamCity\buildAgent\plugins\idea\lib\extensions.jar;C:\Java\JetBrains\TeamCity\buildAgent\plugins\idea\lib\openapi.jar;C:\Java\JetBrains\TeamCity\buildAgent\plugins\idea\lib\jdom.jar;C:\Java\JetBrains\TeamCity\buildAgent\plugins\idea\lib\log4j.jar com.intellij.idea.Main inspect C:\Java\JetBrains\TeamCity\buildAgent\work\Assertion_Editor\AssertionEditor.ipr profile C:\WINDOWS\Temp\inspection51789result -e -v3
The JDK is not configured properly for this project. Inspection cannot proceed. 1.4 not found
+

You can see, properties 1.4, jdk.1.4 and idea.jdk.1.4 are all there

This is part of the ipr project file that references jdk:

<component name="ProjectRootManager" version="2" assert-keyword="true" jdk-15="false" project-jdk-name="1.4" project-jdk-type="JavaSDK">

I even restarted the server but it did not help. Should I setup other properties? Is there any manual? Or how should I foresee that 1.4 actually means idea.jdk.1.4?

0
Comment actions Permalink

I have the same problem but cannot specify the JDK path in the VM parameters because the name of my JDK has spaces and the path to the JDK has spaces. I attempted to escape the spaces by placing quotes around the whole parameter like this

"-Didea.jdk.My JDK=C:\Program_Files\Java\jdk1.5.0_06"

But when the form on the configuration page is submitted the parameter is removed. So I tried to replaces the spaces with underscores. In this case the form doesn't remove it but I still get the message "The JDK is not configured properly for this project. Inspection cannot proceed."

Any ideas for me?

0
Comment actions Permalink

Hello Jeff,

Sorry for late response I didn't notice the message :(

Could you please try to specify (in System Properties and environment variables)
system property with name
jdk.My JDK and value C:\Program_Files\Java\jdk1.5.0_06.

Thank you.

-


Anna Kozlova
JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

I have the same problem but cannot specify the JDK path in the VM
parameters because the name of my JDK has spaces and the path to the
JDK has spaces. I attempted to escape the spaces by placing quotes
around the whole parameter like this

"-Didea.jdk.My JDK=C:\Program_Files\Java\jdk1.5.0_06"

But when the form on the configuration page is submitted the parameter
is removed. So I tried to replaces the spaces with underscores. In
this case the form doesn't remove it but I still get the message "The
JDK is not configured properly for this project. Inspection cannot
proceed."

Any ideas for me?



0
Comment actions Permalink

I have the same proplem. I have tried all suggestions. Can you explain how TC uses these parameters and what can be another source of problems?

0
Comment actions Permalink

Problem was solved by adding IDEA module files to the VCS.

0
Comment actions Permalink

I've tried all suggestions and even restarted.
Getting the same error as the others.
Is there a fix in the next release?

Regards, Stefan

0
Comment actions Permalink

Here's my output if it helps.

Inspection output:
/opt/sunjdk/1.5.0_07-b03/bin/java -Dbuild.working.dir=/home/eueqdtst/TeamCity/buildAgent/work/CMTE -Didea.build.server.checkout.on.server=true -Didea.jdk.1_5=/opt/sunjdk/1.5.0_07-b03/ -Dbuild.number=7 -Djdk.1_5=/opt/sunjdk/1.5.0_07-b03 -Duser.language=en -Duser.country=US -Didea.build.server.buildType.id=bt5 -Dos.version=2.6.9-34.ELsmp -Duser.timezone=Europe/London -Dfile.encoding=ISO-8859-1 -Dfile.separator=/ -Dos.arch=i386 -Didea.no.jdk.check=true -Didea.plugins.path=/home/eueqdtst/TeamCity/buildAgent/plugins/idea/plugins -Duser.name=eueqdtst -Dos.name=Linux -Didea.build.server.is.personal=false -Didea.build.agent.port=9090 -Didea.system.path=/home/eueqdtst/TeamCity/buildAgent/work/CMTE/system -Didea.build.server.run.type=Inspection -Didea.config.path=/home/eueqdtst/TeamCity/buildAgent/work/CMTE/config -Didea.build.server.execution.timeout=0 -Didea.build.server.project.name=CMTE -Dsuccessful.build.number=1 -Didea.home.path=/home/eueqdtst/TeamCity/buildAgent/plugins/idea -Duser.home=/home/eueqdtst -Didea.build.server.build.id=15 -Dpath.separator=: -Demma.disable.source=true -Didea.jdk.1_5=/opt/sunjdk/1.5.0_07-b03/ -Xbootclasspath/p:/home/eueqdtst/TeamCity/buildAgent/plugins/idea/lib/boot.jar -classpath /opt/sunjdk/1.5.0_07-b03/lib/tools.jar:/home/eueqdtst/TeamCity/buildAgent/plugins/idea/lib/idea.jar:/home/eueqdtst/TeamCity/buildAgent/plugins/idea/lib/extensions.jar:/home/eueqdtst/TeamCity/buildAgent/plugins/idea/lib/openapi.jar:/home/eueqdtst/TeamCity/buildAgent/plugins/idea/lib/jdom.jar:/home/eueqdtst/TeamCity/buildAgent/plugins/idea/lib/log4j.jar com.intellij.idea.Main inspect /home/eueqdtst/TeamCity/buildAgent/work/CMTE/dbcf4q/dbcf4q.ipr profile /tmp/inspection9910result -e -v3
The JDK is not configured properly for this project. Inspection cannot proceed.
1_5 not found

0
Comment actions Permalink

Hello Stefan,

Could you please ensure that your .iml files are available on agent. (Next
version already contains appropriate error message.)

If it is ok please send me output from inspections build thus I will be able
to locate the problem.

Thank you for your attention.

-


Anna Kozlova
JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

I've tried all suggestions and even restarted.
Getting the same error as the others.
Is there a fix in the next release?
Regards, Stefan



0

Please sign in to leave a comment.