It's all about the answers!

Ask a question

Missing java class with RTC buildy utility's task


Gustavo Martim (2813) | asked Jul 28 '09, 11:33 a.m.
Hi everyone,

I'm trying to use the build utility but I'm getting the error below:


[projectGetErrors] 1. ERROR in /CSQSWebService_Latest/src/com/ibm/csearch/search/csqs/core/CSQSBean.java
[projectGetErrors] (at line 33) org.eclipse.jdt.core.problem
[projectGetErrors] The import com.ibm.ws.webservices.engine.transport.http.HTTPConstants cannot be resolved
[projectGetErrors] ----------
[projectGetErrors] 2. ERROR in /CSQSWebService_Latest/src/com/ibm/csearch/search/csqs/core/CSQSBean.java
[projectGetErrors] (at line 720) org.eclipse.jdt.core.problem
[projectGetErrors] HTTPConstants cannot be resolved


in the task:


<target name="buildWar">
<projectBuild ProjectName="${project.war}" BuildType="${type}" DebugCompilation="${debug}" />
</target>


At the development time, RAD takes this class from the com.ibm.ws.runtime_6.1.0.jar jar file.

Also the project is set to use the WebSphere Application Server v6.1 at the RAD's Java Build Path.


<classpathentry kind="con" path="org.eclipse.jst.server.core.container/com.ibm.ws.ast.st.runtime.runtimeTarget.v61/was.base.v61"/>


And in the server side I have base_stub and base_v61_stub folders.

Is there a way to set the the missing java package to the projectBuild task?
Or, is there a way to set the location of the container runtime?
Or, is there another way to solve this issue?

Thanks!

8 answers



permanent link
Nick Edgar (6.5k711) | answered Jul 29 '09, 7:15 p.m.
JAZZ DEVELOPER
I'm not familiar with the projectBuild Ant task. Are you saying it comes from the com.ibm.ws.runtime_6.1.0.jar ? If so, try adding the following to the "Ant arguments" field in the Ant tab of the build definition:
-lib {path_to_jar}/com.ibm.ws.runtime_6.1.0.jar

permanent link
Nick Edgar (6.5k711) | answered Jul 29 '09, 7:17 p.m.
JAZZ DEVELOPER
I should clarify that the path has to make sense for the build machine, not your development machine.

permanent link
Nick Edgar (6.5k711) | answered Jul 29 '09, 7:17 p.m.
JAZZ DEVELOPER
Also, if there are any spaces in the path, it should be enclosed in quotes, e.g.
-lib "c:\some path\com.ibm.ws.runtime_6.1.0.jar"

permanent link
Gustavo Martim (2813) | answered Jul 30 '09, 9:21 a.m.
Hi Nick (and everyone),

First of all, thanks for your help.

My problem is not to find the projectBuild ant task but to find the HTTPConstants.

HTTPConstants is present in the com.ibm.ws.runtime_6.1.0.jar and this is the package that I'm not able to use at the build time :(.

Is there another way to build a EAR project without the projectBuild ant task?

Thanks!

permanent link
Nick Edgar (6.5k711) | answered Aug 05 '09, 11:34 a.m.
JAZZ DEVELOPER
> HTTPConstants is present in the com.ibm.ws.runtime_6.1.0.jar and this is the package that I'm not able to use at the build time :(.

Why can't you use it at build time? If the projectBuild Ant task requires that missing class, then it seems like you need that jar on the classpath for Ant. This can be done using the -lib argument.

Sorry, I'm not familiar with the projectBuild task or how to build EARs otherwise. Maybe someone from Websphere, or from the web tools project, can help in their forums.

permanent link
Gustavo Martim (2813) | answered Aug 06 '09, 4:35 p.m.
Hi Nick (and everyone),

I've tried the -lib and got the following error message.


-lib not supported
Configure the Ant runtime classpath using either the global Ant runtime classpath or the Ant runtime classpath for this particular build


Do you have any idea? How can I set the global Ant runtime classpath or classpath for a particular build?

Thanks!

permanent link
Nick Edgar (6.5k711) | answered Aug 07 '09, 9:40 a.m.
JAZZ DEVELOPER
This could happen if you're using an older version of Ant. Which version of Ant are you using? Are you using the one included in the build engine, or specifying another one in the 'Ant home' field of the build definition?

permanent link
Gustavo Martim (2813) | answered Aug 07 '09, 9:44 a.m.
Here is the Ant version.

Apache Ant version 1.7.0 compiled on December 13 2006

As far as I know, I'm using the one included in the build engine.

Is there a way to use another one?

Thanks!

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.