I'm trying to Deploy a Jar File from an ANT script (with OjDeploy), which compiles successfully. But when I run the main project (Which has the Jar dependency), I get a huge incident, when I analysed the incident log, it says
"Caused by: java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist"
I analysed both the jar files (One generated by the ANT script and the other generated from Jdev). I couldn't find any difference b/w Manifest of those two jars. The other folders are also same, In other words, both are almost same, or I'm not able to figure out the difference between the two jar files generated.
Isn't the ANT script generated jar file be same as the one that is deployed from Jdev??
I know, I'm missing something, config of build.xml or something, but not able to figure out the exact problem.
Shiva, have yo ucompare the folder structure only?
You have to look into the files as well. The error is pointing to a missing db connection or the use of hte wrong db connection. In your jar you are trying to access a tabel from another schema.
Have you used the ant ojdeploy target of called ojdeploy to create the jar?
Thanks for quick reply Timo.
I've checked out all the files , the files by content are one and the same in both the jars (I have cross checked the manifest folder many number of times). The table is in the same schema.
The "Caused by: java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist" might be one of the results of the some other issue which could be the root cause for the whole thing. I'm using the default ant script provided by JDev to generate the profile (Jar file in my case)
<ora:parameter name="nocompile" value="true"/>
I'm not overriding the default commands provided except for the Profile Output path, and hence I'm not able to figure out why the code is deviating from the expected behavior. Do I need to add additional configurations?? I strongly feel that issue with might be the path/ permissions or need to have additional configurations in one these adfm.xml or weblogic-application.xml, although I'm not sure.
The query was thrown up as a part of the incident, and I was able to figure of the VO for the query. Tried to run from the Application Module and all the VOs are running well. The other contents in the jar are the View Objects, View Links is same. However, I was able see the sizes of the following files were different.
Some of the major files which were unchanged
3. Resource Bundles
Is it possible to suggest some file I need to check which might have possibly gone wrong? Because this is a scenario where the table/View is existing and I've permissions to access it.
I figured out a way to solve the problem. Not sure what was the cause of this issue, but a couple of changes made both to JAR/EAR build scripts set the things right
While building JAR files:
1. Uncheck "Make this the project build file" while creating the ANT build file, while the "Include Packaging Tasks (uses OjDeploy)" must be checked.
2. Remove "nocompile" parameter from <ora:. > tag in the OjDeploy.
While Building EAR files:
1. Create EAR in the view controller project.
2. Go to the View Controller Project Properties-> Project Source Path -> Resources, remove the newly created build file dependency, which specifies that the build file is for the whole project and not for the individual project.
3. Remove "Project" parameter from <ora:. > tag in the OjDeploy. (Ensures to build for the whole application)
4. Remove "nocompile" parameter from <ora:. > tag in the OjDeploy.
These are the exhaustive set of changes, which I made to ensure the ANT files are building correctly, if you get any other errors after this EAR is deployed, then its definitely due to code, EO/VO or DB related.
Thanks for all the help!!