Preethi Dev

Ranch Hand
+ Follow
since Sep 07, 2008
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Preethi Dev

Hi Ranchers!

could anyone suggest me how to compare(mapping) the values in the csv files with the Database table attribute values?

Based on that I need to update the records or insert with the conditions.

please help me.

Regards
Preethi
Hi,

finally, got the problem solved.

In Jcaps 6 version ojdbc14.jar which is used in the InhouseApiClass has to be included. but this jar file is not included in JCAPS5 version that comes with the JCAPS5 suite.

This drives me into a wrong path of analysis instead of checking the required jar files.

Thanks a lot to rc.

Regards
Preetha
10 years ago
herenow I got the decompiled code of InhouseApiClass which gives error on recompilation.

Here is the sample error while recompiling the code. errors are shown in comment.



but i dont know how far I can trust the decompiled code to analyse the abovesaid issues.
please help me

Thanks in advance,

Preethi
10 years ago
These are the method signatures for methods in InhouseApiClass

public static int com.ack.mware.distribution.v2.filesplitter.InhousApiClass.getSegmentCount(java.sql.Connection,java.lang.String,java.lang.String) throws java.lang.Exception

protected static byte[] com.ack.mware.distribution.v2.filesplitter.InhousApiClass.readBlob(oracle.sql.BLOB) throws java.lang.Exception

public static void com.ack.mware.distribution.v2.filesplitter.InhousApiClass.cleanUp(java.sql.Connection,java.lang.String,java.lang.String) throws java.lang.Exception

public static byte[] com.ack.mware.distribution.v2.filesplitter.InhousApiClass.getContent(java.sql.Connection,java.lang.String,java.lang.String,int) throws java.lang.Exception

javac generates the message for JCAPS6.

any other information that I need to look for?

Regards
Preethi

10 years ago
Hi RC,

my comments are in blue.

create a class that extends this abstract class. Put your own static method in it, then code a call to that method from the class that is making the calls that show errors.

I tired the way you have shown above, I get the same error if I call the staic method getSegmentCount of InHouseApiClass.


ERROR: Method getSegmentCount(java.sql.Connection, java.lang.String, java.lang.String) not found in class com.ack.mware.distribution.v2.filesplitter.InhousApiClass at line 46

If you cannot extend the abstract class, then there is a problem with the compiler attempting to locate it.
I can extend the abstract but still no effect on the code, it gives the same validation error. So I think the package is visible but not the methods in it.

If you can extend it, and can call your method but not theirs, then it has something to do with those methods being in that abstract class instead of in your class.
I can call my static method but not the method "getSegmentCount" in InhouseApiClass by doing so.

Try invoking the methods using the subclass name, instead of the original class name.
I tried to invoke them by using the subclas"Mainhouse" I get the error as

ERROR: Method getSegmentCount(java.sql.Connection, java.lang.String, java.lang.String) not found in class Mainhouse at line 46

All I doubt is how come this case works perfectly in my JCAPS 5 .

All these makes me to ask the below question,

Is there a possiblity that the package is visible but not their static methods which has the public access both in methods and class?


or any compatability issues? since this works fine with the JCAPS 5.

I am really confused to come to a conclusion.

Regards
Preetha



10 years ago
Today 11:30:30 AM Subject: method not found in imported class - JCAPS6

--------------------------------------------------------------------------------

do you get a compiler error every time these static methods in InhousApiClass is invoked, or only on some invocations?
yes, each time when i comile the main class I am getting the compilation error on those inhouse static methods

are there any static methods in that class that are invoked but do not cause the error?
all the static methods in the InhousApiClass gives the error. there is no static methods in JCD_mainhouse.


are there any methods that get the error that are not static?
no, errors are only related to the static methods in the InhouseApiClass

are there static methods elsewhere in your code that do not have the error?
there are no static methods in the main class.

If you write another static method in that class and invoke it from your main, does your new static method get the error?
I dont have the acces to change the inhouse code.

When the methods are invoked, does the code dereference the class name, or a variable name?
It references the class name.

Assuming you are using a classname: are you dereferencing the abstract classname, or a subclass name?
abstract classname. There is no subclass for that InhouseApiClass.


Only the four static methods in the IhouseApiClass gives the compilation error when invoked in main class.
FYI, this a repository project, all the codings are in repository which is hosted on server not in local machine.

10 years ago
Hi Rc,

Thanks for the reply,

FYI,the inhouse class(imported) is an abstract class consists of four static methods with its implementations.There are no abstract methods as well as instance methods.

The main class "JCD_mainhouse" invoke the inhouse class "InhousApiClass" static methods on its class name as usual and finally gives compilation error as I have shown earlier.

I find those Inhouse api's are recognizable in JCAPS 5 and compiles without error but not in JCAPS 6.


Regards
Preethi

10 years ago
Hi Rob,

These methods are our inhouse API's and it's already in use by the JCAPS5 version. this is a migration work to JCAPS 6 I am stuck at this error since this is working without any error in JCAPS 5.

I confirm that the inhouse jar is added to the main class "JCD_mainhouse ". but the other Inhouse stuffs are working correctly in JCAPS 6.

It would be highly appreciable if someone help me to solve this.


Regards
Preethi
10 years ago
Is the head first book enough for this certification preparation?

Regards
Preethi
Hi Ranchers!

I am really surprised by not getting any reply in java ranch the one I admired a lot when I did my SCJP.
Could anyone please throw their suggestions on my topic?

I seemed to be helpless here.

10 years ago
could anyone please help me to solve this?


10 years ago
yes InhousApiClass class compiles.


Here is the method with its parameters and the values will be passed from the main class JCD_mainhouse


public static int getSegmentCount(Connection conn, String interfaceName, String runId)

All my question is how this works in JCAPS5 but not in JCAPS 6.


10 years ago
Hi Ranchers,

currently, I am migrating projects from JCAPS5 version to JCAPS 6 version.when I compile the java code i get the validation error as all the methods residing in the imported class are not visible to the main class

I have checked for jar files which is added and imported the fully qualified class.
I have also checked in th JCaps 5 which does not throw any error. so my view falls on version compatability like features not supported.
please someone correct me if my assumption is wrong.

here is my list of errors:

• ERROR: Method getSegmentCount(java.sql.Connection, java.lang.String, java.lang.String) not found in class com.ack.mware.distribution.v2.filesplitter.InhousApiClass at line 82
• ERROR: Cannot assign **Unknown Type** to int
• ERROR: Method getContent(java.sql.Connection, java.lang.String, java.lang.String, int) not found in class com.ack.mware.distribution.v2.filesplitter.InhousApiClass at line 85
• ERROR: Constructor new String( InhousApiClass.getContent( con, runId, interfaceName, segIdx ) ) not found in class java.lang.String at line 85
• ERROR: Method cleanUp(java.sql.Connection, java.lang.String, java.lang.String) not found in class class com.ack.mware.distribution.v2.filesplitter.InhousApiClass at line 193
• ERROR: Method cleanUp(java.sql.Connection, java.lang.String, java.lang.String) not found in class class com.ack.mware.distribution.v2.filesplitter.InhousApiClass at line 314
• ERROR: Cannot assign **Unknown Type** to int
• ERROR: Cannot assign **Unknown Type** to int

Due to confidentiality,I can not post the code here.

all these methods are static which is defined in a public abstract class InhousApiClass{}





Main class:



I have been working around this for a whole day and i didnt get any clue. Please help me out.

Regards
Preethi
10 years ago
is anyone there to help me?

Thanks
Preetha
10 years ago
Please someone help me to solve this.


Thanks
Preetha
10 years ago