Search code examples
classjarweblogicimplementation

Implementation of jar file


I am a newbie in Java.On the very first day my manager asked me to solve an issue:

They were using hibernate-commons-annotations-4.0.1.Final.jar but then they require to update this to hibernate-commons-annotations-4.0.4.Final.jar. After updating this jar in all the configuration files it is working in local environment but it is not working in the test environment after the build.

Note: This update is done for weblogic server upgrade and not for the application. In our application framework there is feature added in the build.xml , it will exclude the jars which is not all used by the application code.

Now they have asked me write a dummy implementation of that jar file so that this jar file will be included in the build.How should i do that???


Solution

  • I am not totally sure that I can provide the answers that you are looking for, because I am not sure about what you really want to know here. So:

    Regarding the first isse that it is working on your machine but not on the test system: This looks more like some kind of deployment issue. You updated some config files, but did you check to update deployment scripts? Maybe you just need to add that jar in one of them so that it will be uploaded to your server.

    The second issue: I assume that a "dummy implementation of a jar" is just a jar-file containing a single class that is used within some code? Then maybe you should just create some "HelloWorld" class, wrap it in a jar. As you are using a build.xml I assume you are using ant for compilation. So see here how you can create a jar by using the <jar>-task: https://ant.apache.org/manual/Tasks/jar.html

    What would most likely help you is to ask you colleagues to clarify what they want you to do or mean by a "dummy implmentation", I think.