my dog learned polymorphism*
The moose likes Ant, Maven and Other Build Tools and the fly likes  Error: [jspc]: 0 file(s) failed Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark " Error: [jspc]: 0 file(s) failed" Watch " Error: [jspc]: 0 file(s) failed" New topic
Author

Error: [jspc]: 0 file(s) failed

Jyothsna Panchagnula
Ranch Hand

Joined: Jul 11, 2005
Posts: 113

Hi all,

When I am building the application using ANT I am gettting the following error:-



Please tell me where I am going wrong.
Thapliyal Akshat
Greenhorn

Joined: Jun 04, 2009
Posts: 29
Hi Jyotsna,

Looking at the error logs its quite difficult to tell what exactly you are doing in ant. If possible try put the code snippet of that particular target. Furthermore, try to look at this URL might be you get some idea from this. Hope you have watched this before posting the bug in case not, please go through it.

http://www.coderanch.com/t/107766/Ant-Maven-Other-Build-Tools/Ant-Task-precompile-JSP-Weblogic

And the reason behind not compiling the JSP's is because JIKES is failing which is used to compile the JSP to bytecodes.

If possible try to invoke JIKES.exe using a simple java program/DOS with the command that has been printed on your console.
for ex:
On Command Prompt:


This is just to make sure that the way ANT is invoking the jikes.exe is correct.


Thanks and Regards,
Akshat
Jyothsna Panchagnula
Ranch Hand

Joined: Jul 11, 2005
Posts: 113
Hi Thapliyal,

Thanks for responding to my question.
I am using weblogic 8.1 SP6 , but I dont have jikes.exe.

I also placed rt.jar in the classpath , the problem is still there.


thanks,
Jyothsna
Thapliyal Akshat
Greenhorn

Joined: Jun 04, 2009
Posts: 29
Hi Jyotsna,

If you don't have Jikes.exe then why are you invoking I mean why you are using it. If you try to invoke an program that does not reside at the given path then its obvious that Java will throw you an IOException.
From where its picking the JIKES.exe.


Thanks and Regards,
Akshat.
Jyothsna Panchagnula
Ranch Hand

Joined: Jul 11, 2005
Posts: 113
Hi ThapLiyal,

You were right. It was picking from one of the build xml only.
I commented that part and now new error.



I even have the classes12.jar and ojdbc14.jar int eh classpath
thanks
jyothsna
Thapliyal Akshat
Greenhorn

Joined: Jun 04, 2009
Posts: 29
Kool,

At least you moved one step ahead.

So you are saying that the appropriate jar files are in your classpath.

Just to make sure. I am assuming that the classpath is set by your Ant build only. Classpath must be set by your Ant script only[Recommended].

If you are having a classpath as a system/user variable take a backup of that and delete it from the System variables/User variables and then re-execute your ant script. Check whether it works or not.

One thing more you can try. Just try to print the classpath variable using Ant and check whether the required jars are actually in the classpath or not.

Printing Classpath in Ant:




Check the echo message on your console and validate whether ANT is actually setting up the OJDBC14.jar or not.

I am trying to figure out what is causing the problem because the required jar is already set in classpath.

Thanks and Regards,
Akshat.
Jyothsna Panchagnula
Ranch Hand

Joined: Jul 11, 2005
Posts: 113
Hi Thapilyal

When I am doing ant clean this is what I see in the console about the classpath



but when I build I see that package.odbc does not exist.

Am I missing something here?

thank you,
Jyothsna
Thapliyal Akshat
Greenhorn

Joined: Jun 04, 2009
Posts: 29
Hey Jyotsna,


Thing's I wan't to suggest you when ever you face a problem like this.
1) Check your classpath. Classpath should not conflict each other.
2) Open your jar(Using winzip/winrar/7zip) file and check whether the class file is in the same package or not.


I have just checked in my classes12.jar file that the OraclePreparedStatement resides in the package and not in
I also validated ojdbc14-9i.jar and I found that OraclePreparedStatement again doesnot reside in the package that you are referring.

Instead of using use oracle.jdbc.OraclePreparedStatement use oracle.jdbc.driver.OraclePreparedStatement

Hope this will resolve your problem. Please verify in both of your jar files.

Thanks and Regards,
Akshat
Jyothsna Panchagnula
Ranch Hand

Joined: Jul 11, 2005
Posts: 113
Hi Thapilyal,

I checked in ojdbc, ojdbc14-9i and classes12.zip.
I have OraclePreparedStatment class in oracle.jdbc package.

the error still persists.

thanks,
Jyothsna
Jyothsna Panchagnula
Ranch Hand

Joined: Jul 11, 2005
Posts: 113
Hi Thapilyal,

I got that error fixed.

thank you for your valueable inputs.

-Jyothsna
Thapliyal Akshat
Greenhorn

Joined: Jun 04, 2009
Posts: 29
O Kool,

So wat was the problem dear. Was it specific to your envoironment?

Please share your experience. Will help me for future.

Thanks and Regards,
Akshat Thapliyal
Jyothsna Panchagnula
Ranch Hand

Joined: Jul 11, 2005
Posts: 113
Hi Thapliyal,

The ant script was referring to a specific location for ojdbc.jar file.
I placed the jar file and ran ant script.
it was looking in myproj/app/java/lib. I was missing this location.

cheers,
Jyothsna
Jyothsna Panchagnula
Ranch Hand

Joined: Jul 11, 2005
Posts: 113
Hi Thapilyal,

Now when I am migrating the app to 9.2 weblogic
this is what I am seeing



I have placed xbean.jar in the classpath.
Am I missing anything here?

-Jyothsna
Thapliyal Akshat
Greenhorn

Joined: Jun 04, 2009
Posts: 29
Hey Jyotsna,

So you are trying to migrate the project from 8.1 SP 6 to 9.2.
Where did you set your classpath?

Try to set the classpath in the "<BEA_HOME>user_projects\domains\<DOMAIN_NAME>\bin\startWebLogic.cmd"
Edit this file and search for CLASSPATH append the required jar file with absolute path in this variable.

Restart your weblogic server. Check in your weblogic server console whether its displays your jar file in the classpath or not.

Please revert in case you are having some issues in doing the above stuff.

I know this is not the best solution in town but just give a try then we can work on more standard approach.

Thanks and Regards,
Akshat.
 
GeeCON Prague 2014
 
subject: Error: [jspc]: 0 file(s) failed