Thapliyal Akshat

Greenhorn
+ Follow
since Jun 04, 2009
Merit badge: grant badges
For More
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 Thapliyal Akshat

Hello Everyone,

I have created a web service client using Axis2. Within the response I get a PDF URL which the Web service has created on its own server. The Web service is developed by a third party.

My concern is how can I save that PDF on my servers. I need exact replica of the actual PDF because that PDF is mailed to every customer.

I know that there are lot of API's available to which I can pass the URL but Is there any other way through which I can achieve this using the Web Service technologies.


Thanks and Regards,
Akshat Thapliyal
14 years ago
Hey Priyanka,

I don't know why are you are inventing a new wheel. I believe you might want to create own build tool .

Just kidding dear.. It's good .

Ok now lets talk about your problem.

So you have an XML which is exactly similar to build.xml. So that means it conforms to a schema.

Just download the ant schema form net. Use JAXB to create java objects/classes out of the schema and done.

You can now fetch any attribute/value using JAXB.

For more information how to use JAXB please check some online tutorial.


Thanks and Regards,
Akshat
14 years ago
Hi Ankur,

So you want to create a want to create desktop icons or Shortcut icons.

Just check this URL "http://www.jrsoftware.org/isinfo.php"

I have been using the Inno setup to distribute my Java Desktop applications.

It creates your Installer, Creates a desktop icon and also creates uninstaller.

But for those all these things you have to write your Inno script (iss) and then integrate it in your ANt/Maven script which will automatically invoke the Inno setup compiler and creater your setup.exe.

I have been using this software since ages for my Desktop based applications and its good and the main thing its free.

Please check the help file you will get lot of examples.

Thanks and Regards,
AKshat
14 years ago
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.
14 years ago
Hi Sanjay,

In the first post only I have noticed your <relativePath>../../parent/pom.xml</relativePath>. But I thought you have done this intentionally.

First thing I want to convey is: Maven works on inheritance.
You define your parent pom.xml and then you define dependencies/Sub modules under <modules>.
Now your parent pom packaging should be of type pom in order to make it parent. Parent now know who are his child.

But how would a child/module will define a relationship with parent.
In each module you define

This is what how a child is related to its parent.

Just FYI this is known as cyclic dependency in Maven. Parent <-> child.

If you want to learn more abt maven how does it creates and maintain the structure I would suggest you to read something related to managing multi-module project in maven. Its only 30 minutes guide.

http://scriptlandia.blogspot.com/2006/05/how-to-make-javaee-project-with-maven2.html

Just spend some time on above url. Its a practical guide. Do what the author says and you will know lot of things about Maven which you don't do often.

Thanks and Regards,
Akshat.

14 years ago
Ok,

So your maven help plugin is not working..

My dummy project hierarchy is as follows:

|---secondDemo (contains parent pom.xml)
|
|------------------jaxb-api (contains module1 pom.xml)
|------------------------------src
|-------------------------------------main
|--------------------------------------------xsd (contains simple xsd file)
|------------------jaxb-src (contains module2 pom.xml)
|------------------------------src
|-------------------------------------main
|--------------------------------------------java
|-------------------------------------------------com
|------------------------------------------------------akki
|-----------------------------------------------------------mvn (Contains my simple hello world class)


PARENT POM.XML




MODULE1 (jaxb-api) POM.XML


MODULE2 (jaxb-src) POM.XML




Just create a structure the way I have created and copy the pom.xml in the respective directories.
Then on the module 1 folder execute the command mvn install. This will deploy your jaxb-api-1.1.jar in your local repo.

Once done. Goto your parent directory and execute the command on the parent pom.
mvn package.

Thanks and Regards
Akshat

14 years ago
Hi Sanjay,

I tried to replicate your problem but unfortunately It build with the version that I have specified for the specific module in both places (repot and target). That is, It did not picked my parent pom version.

I would suggest you to run this command mvn help:effective-pom.

It would display you the exact pom that is being run by maven. So execute it and check if you find any thing there.

I will be giving more try to your problem.

Thanks and Regards,
Akshat
14 years ago
Hey David,

I really appreciate your explanation. It's good and very informative for those who don't know what CC/CI is.

Small description but comprehensive.

Thanks and Regards,
Akshat
14 years ago
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
14 years ago
Hey Rajneesh,

Just to addon on David's reply.

CC servers are not version control. You can define in maven under <scm> the path of your repositories and under <ciManagement> the Cruise control configurations. You can define your plugins in maven to deploy automatically on Appserver.

CC knows how to interact with ANT,Maven or any other build tool.

CC is just an integration environment. It picks your code from the head of VSS/SVN/CVS and builds your artifiacts and deploy it on your AppServer.

It's the mediator between your build tools and the deployment environment. Either you do it manually or through CC.

Hope this will clear the muddle of cloud.


Thanks and Regards,
Akshat
14 years ago
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
14 years ago
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.
14 years ago
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.
14 years ago
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.

https://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
14 years ago
Hey Peter,

The reason behind for picking the 2.2 snapshot jar file is because the maven is picking the jars from our Organization's internal repository. I have just checked my Org. internal repository using archiva and I found that It has this version only.

Furthermore, When I delete all the maven-help-plugin related jars from my local machine repo. it downloads from the same Internal repo which has been configured in settings.xml file by me.

So I think I should communicate it to the team who manages our Maven repository that I am facing such and such problem.

One thing more.. All the help:describe commands works fine at my home PC but at office PC no help:describe command works. So now i know how to fetch the details of plugin using help:describe command.


Thank a ton dear for telling me how to enable verbose for mvn on this forum. But now I got stuck with another issue of Mvn. Will be posting in a new thread if I am not able solve it own my own.

Akshat
14 years ago