Cavaj

Hi,
I have the source code which I am not sure is the latest. So I plan to take the class file, use a converter tool like cavaj and then compare the file with the source using Eclipse.
But I want to know how will the output of cavaj be.Will it give me the exact replica of the original source(which as compiled). This is important because eclipse does a character to character comparison.
Is there a better way of doing this??

I have the source code which I am not sure is the
latest. So I plan to take the class file, use a
converter tool like cavaj and then compare the file
with the source using Eclipse.As you've heard that's not possible, but you could try the other way:
Compile your source and do a byte-for-byte comparison of the resulting class file. You have to be carefull to have the same compilation environment, 'though. Different compiler versions, different flags (-g, -O) and so on can result in slight changes in your class file.
And if you are very desperate. Compile your source and then decompile both class files and do a visual diff on those two.
But the real solution is to only roll out clearly identifyable binaries where each binary can be directly mappe to a single version of your source code (for example some Version-Information in the jar files Manifest). You'd also want to tag the coresponding version in your version control system (like CVS, you do use one, don't you?).

Similar Messages

  • How do I find out if a class file has deprecated functions

    Currently I'm having problems with a old Visual Cafe class.
    It is definately using deprecated awt funcions.
    My question is..
    1) Without the source code how do I find out what deprecated functions the CLASS file is using.
    2) Has any deprecated class been truly scrapped ? If so, I cannot find
    it in the JDK API documentation or the java.sun.com search engine..

    Here is what I did, to answer your question. I unzipped the symantec jar and used a decompiler (JAD works fine, or cavaj) to create an entire src tree (you can do this with 1 command). Then, compile using your target version of Java. There are well over 100 warnings (with -deprecation on) ranging from Cafe's use of awt.Component methods (mostly), Thread.suspend in their Timer class, to the use of java.util.Date in their Calendar component.
    Cheers!

  • How to get the source code of a PRT application in the portal

    Hi!
    Does anybody know how to get the source code of a PRT application in the portal?
    Thanks in advance,
    Celso

    Celso,
    If its Java-based code have a look at the properties of an iView that belongs to the application in question and copy the value of the Code Link parameter e.g. 'com.sap.pct.hcm.rc_vacancyrequestov.default'.
    Search the Portal installation directory under /j233/cluster/server/ for a .par.bak file of the same name, removing .default from the codelink parameter
    e.g. com.sap.pct.hcm.rc_vacancyrequestov.par.bak
    Copt this locally and import into Netweaver Developer Studio. You will have to decompilte the class files with a decompiler such as DJ Decompiler or Cavaj (search with Google).
    Cheers,
    Steve

  • TransformerException -- possible bug in weblogic.apache.xalan.transformer.TransformerImpl

    Using WebLogic Server 6.1 SP2. Am using xslt to transform xml into html. After
    repeatedly
    using the same Transformer object to transform different xml documents, the Transformer
    eventually becomes corrupt – sometimes after 20 or so transforms, sometimes only
    after
    thousands.
    Once the Transformer object becomes corrupt, any additional attempt to call the
    transform
    method results in the following exception:
    =============================
    javax.xml.transform.TransformerException: -1
    at weblogic.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1248)
    at weblogic.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:483)
    at weblogic.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1153)
    at … <snip>
    Caused by: java.lang.ArrayIndexOutOfBoundsException: -1
    at weblogic.apache.xml.utils.NodeVector.popQuick(NodeVector.java:247)
    at weblogic.apache.xpath.XPathContext.popCurrentNode(XPathContext.java:552)
    at weblogic.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(TransformerImpl.java:2100)
    at weblogic.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1225)
    at … <snip>
    =============================
    Using cavaj to decompile weblogic.apache.xalan.transformer.TransformerImpl yields:
    Method: applyTemplateToNode:
    try
    pushElemTemplateElement(elemtemplateelement1);
    m_xcontext.pushCurrentNode(node);
         <snip>
    catch(SAXException saxexception)
    throw new TransformerException(saxexception);
    finally
    m_xcontext.popCurrentNode();
         <snip>
    So what appears to be happening is that one of the two push calls at the beginning
    of the try
    block is throwing an Exception, causing the pop method to be called in the finally
    block without
    first having had a successful call to push. The corresponding NodeVector inside
    m_xcontext
    thereupon becomes corrupt, and it is only a matter of time before the above
    ArrayIndexOutOfBoundsException appears.
    Unfortunately, we are unable to consistently reproduce this Transformer corruption
    and
    currently have no idea how it happens in the first place. We figure there’s probably
    some sort
    of error in our xsl stylesheet which is at the root of all this, but have had
    no luck in finding it.
    So, two questions:
    1.) Has anyone encountered this problem of having a bad xsl stylesheet which,
    when applied
    repeatedly on certain xml documents, can cause the Transformer to become corrupt
    as a result
    of calling NodeVector.pop without a corresponding call to NodeVector.push? If
    so, do you have
    a simple example of the type of xsl template and/or xml document which might reproduce
    the
    scenario.
    2.) Would not the above code snippet in TransformerImpl be considered buggy in
    any case,
    since it should not be possible for an invalid xsl stylesheet to permanently corrupt
    the
    Transformer? If there’s agreement that this represents a bug in TransformerImpl,
    has it been
    fixed in 6.1 SP3 or higher, or in subsequent versions of the Weblogic Server?
    Thanks,
    John

    hi,
    I've just recently started getting this error too. It's completely random as
    to when it occurs. My system can process hundreds of translations with no problems
    and then once and awhile I get this exact error.
    I'm using WebLogic v7.0 sp2. I've noticed however that this only happens on my
    Windows system - I've got it running on a solairs box with no problems.
    Has anyone else seen this ?
    Thanks.
    Jerry
    "John Lame" <[email protected]> wrote:
    >
    Using WebLogic Server 6.1 SP2. Am using xslt to transform xml into html.
    After
    repeatedly
    using the same Transformer object to transform different xml documents,
    the Transformer
    eventually becomes corrupt – sometimes after 20 or so transforms, sometimes
    only
    after
    thousands.
    Once the Transformer object becomes corrupt, any additional attempt to
    call the
    transform
    method results in the following exception:
    =============================
    javax.xml.transform.TransformerException: -1
    at weblogic.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1248)
    at weblogic.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:483)
    at weblogic.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1153)
    at … <snip>
    Caused by: java.lang.ArrayIndexOutOfBoundsException: -1
    at weblogic.apache.xml.utils.NodeVector.popQuick(NodeVector.java:247)
    at weblogic.apache.xpath.XPathContext.popCurrentNode(XPathContext.java:552)
    at weblogic.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(TransformerImpl.java:2100)
    at weblogic.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1225)
    at … <snip>
    =============================
    Using cavaj to decompile weblogic.apache.xalan.transformer.TransformerImpl
    yields:
    Method: applyTemplateToNode:
    try
    pushElemTemplateElement(elemtemplateelement1);
    m_xcontext.pushCurrentNode(node);
         <snip>
    catch(SAXException saxexception)
    throw new TransformerException(saxexception);
    finally
    m_xcontext.popCurrentNode();
         <snip>
    So what appears to be happening is that one of the two push calls at
    the beginning
    of the try
    block is throwing an Exception, causing the pop method to be called in
    the finally
    block without
    first having had a successful call to push. The corresponding NodeVector
    inside
    m_xcontext
    thereupon becomes corrupt, and it is only a matter of time before the
    above
    ArrayIndexOutOfBoundsException appears.
    Unfortunately, we are unable to consistently reproduce this Transformer
    corruption
    and
    currently have no idea how it happens in the first place. We figure
    there’s probably
    some sort
    of error in our xsl stylesheet which is at the root of all this, but
    have had
    no luck in finding it.
    So, two questions:
    1.) Has anyone encountered this problem of having a bad xsl stylesheet
    which,
    when applied
    repeatedly on certain xml documents, can cause the Transformer to become
    corrupt
    as a result
    of calling NodeVector.pop without a corresponding call to NodeVector.push?
    If
    so, do you have
    a simple example of the type of xsl template and/or xml document which
    might reproduce
    the
    scenario.
    2.) Would not the above code snippet in TransformerImpl be considered
    buggy in
    any case,
    since it should not be possible for an invalid xsl stylesheet to permanently
    corrupt
    the
    Transformer? If there’s agreement that this represents a bug in TransformerImpl,
    has it been
    fixed in 6.1 SP3 or higher, or in subsequent versions of the Weblogic
    Server?
    Thanks,
    John

  • Applet: .class Not Found

    I'm a complete newbie in Java programming, but I'm definitely falling in love for it!...As a beginner I'm trying to practice by modifying some classes I've downloaded in this way:
    I open downloaded class file with "CavaJ Java Decompiler" (first decompiler I've found), then I make some changes (little changes, like in colours, just to make experience), than I copy my new code in notepad, save it as .java (using same name assigned before), finally I compile it from DOS (javac myfile.class).
    No problems till this, but once I overwrite original myfile.class with my modified one, the Applet doesn't start anymore: status bar says (myfile.class NotFound).
    Can anyone give me a hint for this silly problem? Thanks so much in advance
    Emiliano

    try
    http://forum.java.sun.com/thread.jsp?forum=63&thread=394593

  • Extending view object which does not have any entity object associated with

    Dear all
    I am interested in extended on of the standard pages VO object in JDeveloper OA extension
    the standard page is oracle/apps/pos/supplier/....suppSummaryPG
    and one of the view which I am interested to extend is suppSummVO
    the problem is that when I copy xml files and java files from apps server to
    my local jdevelope folder , I am not able to open that suppSummVO, the changes which
    I find from other VO object and this(suppSummVO) object is that, this VO does not have any
    Entity Object associated with it and the only query is return on this VO , is it the reason that
    I am not able to open it Jdeveloper, but the real issue is that how can I extends this type of VO
    in my OAExtension.
    Regard
    Noman

    Its the same way of extending VO with EO's or without EO's.
    Sometimes if the .class files arn't decompiled we get weird jbo errors. So use cavaj/jad to decompile those Impl.class, RowImpl.class files and keep them in the same folder as vo.xml in myprojects and try extending that VO.
    Thanks,
    Ravi

  • Add code To stander Java Clsess

    I have requirement to add button in stander OA Page To Print Report I need to implement this solution
    http://apps2fusion.com/at/ps/260-integrating-xml-publisher-and-oa-framework
    I Follow this step
    1- take all mds file from CE application to my project
    2- take all classes file to classless
    3- open the project in jdeveloper
    4- add button to BankAccountTransferPG.xml
    5- run the application
    all of this steps working fine and my application run with new button
    my problem is i need to put code under the button fire and after searching for java code in my application i didn't find any thig
    i found only classes file
    can any one help me how to find stander java code to put new method
    thanks

    Hi,
    You cannot modify standard class files. You have to create a new custom java controller file and extend that from standard controller class.
    However just for refering, u can use cavaj software to de-complie those class files.
    --Sushant                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • EDitorKit development -- XMLEditorKit

    Does anyone know if future versions of Java will include a XMLEditorKit, or is something like this available elsewhere?
    I am attempting to build a simple text editor capable of highlighting XML tags, elements, attributes, etc. with different colors to ease XML document creation. I know there are existing editors like this on the market (I use JBuilder5, which has this built in.) But I want to be able to make my own editor so that I can include features custom for a specific projects, such as including the same validator engine used in our production, and ability to "publish" completed documents to our own server.
    I have studied the JavaEditorKit example at the following URL: http://java.sun.com/products/jfc/tsc/articles/text/editor_kit/index.html
    However, the above example uses several undocumented classes. Specifically, I find it difficult to follow what they have done in the sample Token class because they are using the sun.tools.java.Constants class, which I cannot seem to figure out without any documentation.
    I have seen other posts in this forum on this subject, but nothing very recent. Just wondering if anyone out there has any EditorKit "news" or updated tutorials, or has any sample code they would be willing to share.
    Thanks in advance.

    I recently unjar'ed (i.e. unzipped) tools.jar, ant then used the program javap to look at the signature og each method.
    If you want the whole source you can decompile the class file using cavaj or jad (java de-compiler) http://www.bysoft.se/sureshot/cavaj/

  • Where can I find  the source code of cachedrowset

    I want to read the source codes of cachedrowset and other classes in rowset.jar .
    where can I find it?
    thanks

    download rowset.jar a JAVA Decompiler tool , for example cavaj,then get the source code

  • Issue of Security about Java Source Code

    At most time Java compiler compiles the *.java source code into *.class files and then pack them in *.jar files running in the Java VM or as applet running on web pages.
    Recently I find a tool named cavaj that can decompile *.class files into *.java files. I tried it to decompile my *.class files and unvealed that the decompiled *.java files are the same of my source code!
    How to protect the source code not to be pirated? This is a big problem about the mechanism of Java. Is there any tool to compile *.java to *.exe files? Or is there any tool that can decompile *.exe to *.java in the future?

    This is a common question. If you do a search you will find many answers/solutions.
    But can it affect the performance of the program? Your program mayload slight faster, but the runtime performance is the same. It may effect your performance as it takes some time to get the obsufaction right, especially if you are using reflection.

  • OIM manipulating provisioning - description on resource profile

    Kamaraden!
    I have an OIM installation with AD and Exchange connectors. When users are provisioned, going back to the resource profile, you can see the resource and several data, for example the Description field. For AD User, descriptions shows the windows logon name (what I think it is correct), and for Exchange, it shows a number (probably a key of some table). Trying to discover from where this description field is taken, I realized that it comes from the ORC table, ORC_TOS_INSTANCE_KEY (if I change it, it changes in the description of the resource profile too).
    I have many questions about this. First of all, who puts this value in this field of the ORC table. I followed the provisioning tasks for AD and Exghange (Create User and Create Mailbox), and got inside the code (I decompiled it with cavaj), but the logic of the adapters attached to that process task and the code in the java classes, only creates efectively the user or the mailbox, and returns.. so, when the resource profile is being modified?
    Other question related to that, is where are the conventions of the process tasks names for provisioning? For example, FIELD Updated reacts over the event of modification of FIELD. Create User sounds logic for provisioning when a resource is granted on an application, but Create Mailbox? How is this task attached with the provisioning submit of a resource?
    DrLDAP

    You are right, the number that you see in the description field in the resource profile is the ORC KEY. If you need to change this to show any value in the process form, you can do so by going to the provisioning workflow form in the design console and click of Map Descriptive field.
    I dont think it has been documented anywhere about the field name<space updated> task.
    The name Create User or Create Mailbox has no significance. you can really keep any name for the task. The way OIM understands that it needs to execute this task is if it sees the task is marked as "Required for Completion". all tasks marked required for completion will be executed by oim before it can say that provisioning has been completed. For e.g i a provisioning process all you might need to do is send a mail and not create any account etc.
    then you have a task "Send mail" (or any name) mark the task as required for completion. Now when this resource is granted by the admin to the user, this task would have executed. The name is not of essence when it comes to provisioning.

  • Extending an extended VO

    Hi All,
    What will be best practice, when I need to modify already extened VO? It's for a LOV.
    Some one else extened the VO for the LOV and it's in PROD now but need to add couple of more columns in the same VO for LOV.
    Thanks

         Identify the VO which you want to extend.
         Go to About This Page  Expand All  Find the VO.
         Download class files & xml files related to VO.
         And Download server.xml also.
         File like TableVOImpl.class
         If VO is based on EO, download EO also.
         In server we have only class files.
         Using Java decompiler tool, make class file into java file.
         Tool like Cavaj….
         Generate jpr & bc4j in Jdeveloper based on standard VO.
         Open VO in Jdeveloper.
         Create New VO by Extending Standard VO.
         Save the Jdeveloper.
         Do substitution in jpx.
         Right click jpx  Edit  Substitution.
         Select both New & Old VO and click OK.
         Migrates now VO files into server.
         Run jpximport script.
         Bounce the Apache server.
    Regards,
    Anbu

  • Class java.lang.ClassCastException

    Hello,
    In a Collaboration Room we are using discussion Iviews with the LayoutSets Discussiongroups and DiscussiongroupsContributor. We are using SAP Portal NetWeaver2004 SP17.
    By mistake we've made some changes in these LayoutSets and are getting the following stacktrace.
    java.lang.ClassCastException
            at com.sapportals.wcm.rendering.component.cm.ResourcePath.doInitialize(ResourcePath.java:1228)
            at com.sapportals.wcm.rendering.component.cm.ResourcePath.render(ResourcePath.java:364)
            at com.sapportals.wcm.rendering.layout.cm.DiscussionGroupLayoutController.render(DiscussionGroupLayoutController.java:104)
            at com.sapportals.wcm.rendering.control.cm.WdfProxy.render(WdfProxy.java:1717)
            at com.sapportals.wdf.layout.HorizontalLayout.renderControls(HorizontalLayout.java:42)
            at com.sapportals.wdf.stack.Pane.render(Pane.java:155)
            at com.sapportals.wdf.stack.PaneStack.render(PaneStack.java:67)
            at com.sapportals.wdf.layout.HorizontalLayout.renderPanes(HorizontalLayout.java:73)
            at com.sapportals.wdf.stack.Pane.render(Pane.java:158)
            at com.sapportals.wdf.stack.PaneStack.render(PaneStack.java:67)
            at com.sapportals.wdf.layout.HorizontalLayout.renderPanes(HorizontalLayout.java:73)
            at com.sapportals.wdf.stack.Pane.render(Pane.java:158)
            at com.sapportals.wdf.stack.PaneStack.render(PaneStack.java:67)
            at com.sapportals.wdf.layout.HorizontalLayout.renderPanes(HorizontalLayout.java:73)
            at com.sapportals.wdf.stack.Pane.render(Pane.java:158)
            at com.sapportals.wdf.stack.PaneStack.render(PaneStack.java:67)
            at com.sapportals.wdf.WdfCompositeController.internalRender(WdfCompositeController.java:696)
            at com.sapportals.wdf.WdfCompositeController.build...
    We still can create a Discussion Theme and we also can  create a discussion within the Discussion Theme.
    But when we would like to respond to the discussion, we are getting an error.
    Can someone help me with this problem?
    Greetings,
    Gene

    Hi Detlev,
    The error is still the same. I decompiled the ResourcePath.class. The strange thing is that there is no line 1228. The code ends with line 1095. Can it be the decompiler? (I decompiled with Cavaj).
    The methode doInitialize() is on codelines 991-1010 and looks like this:
        private void doInitialize()
            throws WcmException
            ICustomizingController cc = CustomizingControllerFactory.getCustomizingController((ICollection)getResource(), (ICollection)getResource(), getProxy().getParameters(), getProxy());
            IParameterName names[] = getLayoutObject().getSupportedParameters();
            boolean isCollectionStyleSetOff = false;
            if(getLayoutObject().getParameters().isExactlyValue(ICollectionRendererParameterNameConst.COLLECTION_ACTIONSTYLE, "off"))
                isCollectionStyleSetOff = true;
            if(names != null)
                IParameters parameters = cc.parameters().getParameters(getFlavor(), names);
                getLayoutObject().setParameters(parameters);
            if(isCollectionStyleSetOff)
                getLayoutObject().setParameter(ICollectionRendererParameterNameConst.COLLECTION_ACTIONSTYLE, "off");
    I expect that a classcastexception can occur in the first line... but why? What do you think?
    Thanks,
    Eric

  • ClassNotFoundException - NoClassDefFoundError: AdfResourcebundleConfig

    Before this time I used to get a ClassNotFoundException on AdfResourceBundleConfig which is different from AdfResourcebundleConfig, the class name I found in the resourcebundle directory.
    I traced this, called up the particular java file in jdeveloper,made the necessary changes and compiled. I used cavaj to confirm that the .class file generated had the changes. I copied this .class file to the appropriate directory, jarred the directories and placed them appropriately.
    On starting the server again I noticed:
    weblogic.application.ModuleException:
    at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1376)
    at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:452)
    at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
    at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)
    Truncated. see log file for complete stacktrace
    java.lang.NoClassDefFoundError: oracle/adf/mbean/share/config/runtime/resourcebundle/AdfResourcebundleConfig
    at java.lang.Class.getDeclaredMethods0(Native Method)
    at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
    at java.lang.Class.getMethod0(Class.java:2670)
    at java.lang.Class.getMethod(Class.java:1603)
    at oracle.mds.internal.melement.MBeanModelFactory.createNode(MBeanModelFactory.java:220)
    Truncated. see log file for complete stacktrace
    I dont know where the server is reading this AdfResourcebundleConfig from as there is no such thing anymore in the adfsharembean.jar.
    Please I need responses ASAP as we need to meet a deadline.

    Hi,
    Was there no other solution for you than to recompile the class and put it back in the jar?
    Anyway, this class is located in Adf Common Runtime library, try including that in your project.
    Pedja

  • Search for a wod in java classes in windows 7

    Hello,
    How to search for a specific word in a list of java classes in my windows directory? I know we can search in .java files but not sure how to do the search in .class files. Any help is really appreciated.
    Thank You
    -KK

    Hi,
    For searching in .class files, you need to decompile those using some decompiler.
    1) You can use JAD (Java Decompiler) and decomplie using these commmands:
    jad *.class
    rename *.jad *.java
    2) There is another decomplier, CAVAJ which is very user friendly. You just need to drag the class file onto this and it will show the java code for that class file.
    --Sushant                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Maybe you are looking for

  • F4 help for file name

    frnds, Im using the FM "KD_GET_FILENAME_ON_F4" to get F4 help for file name in presentation server... but it does not seem to work...Y????????? and is there any FM to get the file name from the application server.. points assured to all the answers..

  • Error code #-34502

    Get above code every time I use theme = Full Frame 05. Don't get it when using a non-full frame theme eg Fish. Have found discussion re this from a previous request and looked at http://support.apple.com/kb/TS2180. I can display "Show tv safe area" b

  • Pause/glitch in photo slideshows at chapter changes

    Hi all. I'm a wedding photographer and use iDVD to make slideshows for my clients of their wedding day. I usually make separate slideshows for getting ready, the ceremony and the reception. If a particular slideshow is longer than seven minutes or so

  • Populating IDoc

    Hi, I have a custom IDoc with 2 same level segments, No mandatory segments are there. These two segment's max number of repetitions are 99999. I am filling the IDocs in the following way. I am filling the first segment in a loop after that I am filli

  • C7280 All-in-One Printer - "Pump Motor Stalled" - how to fix?

    Any advice on what is to be done to fix the above issue would be greatly appreciated.  Thanks