Karthik Veeramani

Ranch Hand
+ Follow
since Dec 22, 2002
Merit badge: grant badges
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Karthik Veeramani

hi, thanks for the reply. I resolved the error. It was due to some improper package name in the <package> tag.
18 years ago
I'm new to maven and xdoclet and I have a confusion in organizing my project. I need to run ejbdoclet and hibernatedoclet on my source, then compile. After this, I need to create 2 jar files, each of them containing some files from the previous steps' output.

By default, one jar is created as the artifact. This one contains ALL the class files, but this isnt what I want (I need only some of them to be present in the jar). The rest of the class files (with some overlap) should go into another jar.

I'm not sure how to exclude .class files from the artifact coz they seem to be happening by default. Also, I tried creating a new project for the 2nd jar, extending the previous. Now, I need some way to copy the class files I need from the parent and jar them up. I used "jar:jar" as the default goal for this new project, extended the previous project, added the parent's classes as resources. But this new one seems to be running ejbdoclet, trying to create xml files (all this is being done only in the previous proj), throwing a lot of errors.

Please help me by giving a proper way to accomplish this task.
18 years ago
Please help me understand this stack trace -

Deploy TEMPLATE URL: jar:file:C:\Documents and Settings\karthikv\.maven\repository\xdoclet\jars\xdoclet-apache-module-1.2.jar!/xdoclet/modules/apache/axis/ejb/resources/axis-deploy_wsdd.xdt
Undeploy TEMPLATE URL: jar:file:C:\Documents and Settings\karthikv\.maven\repository\xdoclet\jars\xdoclet-apache-module-1.2.jar!/xdoclet/modules/apache/axis/ejb/resources/axis-undeploy_wsdd.xdt
java.lang.NullPointerException
at java.util.StringTokenizer.<init>(StringTokenizer.java:182)
at xdoclet.tagshandler.PackageTagsHandler.getPackageNameFor(PackageTagsHandler.java:60)
at xdoclet.tagshandler.PackageTagsHandler.getPackageNameFor(PackageTagsHandler.java:35)
at xdoclet.tagshandler.PackageTagsHandler.packageNameAsPathFor(PackageTagsHandler.java:114)
at xdoclet.GenerationManager.isGenerationNeeded(GenerationManager.java:345)
at xdoclet.GenerationManager.isGenerationNeeded(GenerationManager.java:182)
at xdoclet.TemplateSubTask.startProcessForAll(TemplateSubTask.java:615)
at xdoclet.TemplateSubTask.startProcess(TemplateSubTask.java:597)
at xdoclet.XmlSubTask.startProcess(XmlSubTask.java:198)
at xdoclet.modules.ejb.dd.EjbDotXmlSubTask.execute(EjbDotXmlSubTask.java:217)
at xdoclet.XDocletMain.start(XDocletMain.java:48)
at xdoclet.DocletTask.start(DocletTask.java:464)
at xjavadoc.ant.XJavadocTask.execute(XJavadocTask.java:110)
at org.apache.tools.ant.Task.perform(Task.java:341)
at org.apache.commons.jelly.tags.ant.AntTag.doTag(AntTag.java:185)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
at org.apache.maven.jelly.tags.werkz.MavenGoalTag.runBodyTag(MavenGoalTag.java:79)
at org.apache.maven.jelly.tags.werkz.MavenGoalTag$MavenGoalAction.performAction(MavenGoalTag.java:110)
at com.werken.werkz.Goal.fire(Goal.java:639)
at com.werken.werkz.Goal.attain(Goal.java:575)
at com.werken.werkz.WerkzProject.attainGoal(WerkzProject.java:193)
at org.apache.maven.jelly.tags.werkz.MavenAttainGoalTag.doTag(MavenAttainGoalTag.java:127)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:233)
at com.werken.werkz.jelly.PreGoalTag$1.firePreGoal(PreGoalTag.java:87)
at com.werken.werkz.Goal.firePreGoalCallbacks(Goal.java:691)
at com.werken.werkz.Goal.fire(Goal.java:616)
at com.werken.werkz.Goal.attain(Goal.java:575)
at com.werken.werkz.Goal.attainPrecursors(Goal.java:488)
at com.werken.werkz.Goal.attain(Goal.java:573)
at com.werken.werkz.Goal.attainPrecursors(Goal.java:488)
at com.werken.werkz.Goal.attain(Goal.java:573)
at com.werken.werkz.Goal.attainPrecursors(Goal.java:488)
at com.werken.werkz.Goal.attain(Goal.java:573)
at com.werken.werkz.Goal.attainPrecursors(Goal.java:488)
at com.werken.werkz.Goal.attain(Goal.java:573)
at org.apache.maven.plugin.PluginManager.attainGoals(PluginManager.java:671)
at org.apache.maven.MavenSession.attainGoals(MavenSession.java:263)
at org.apache.maven.cli.App.doMain(App.java:488)
at org.apache.maven.cli.App.main(App.java:1239)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.werken.forehead.Forehead.run(Forehead.java:551)
at com.werken.forehead.Forehead.main(Forehead.java:581)

BUILD FAILED
File...... C:\Documents and Settings\karthikv\.maven\cache\maven-xdoclet-plugin-1.2.3\plugin.jelly
Element... ejbdoclet
Line...... 27
Column.... 20
Unexpected error
18 years ago
I'm new to maven. Trying to use maven 1.0.2 xdoclet:ejbdoclet on some ejb code to generate home interfaces and compile them. I'm using fileset in project.properties to compile only the files ending with Bean.java, and also exclude some of these Bean files. My problem is, maven doesnt seem to use my fileset. It just runs ejbdoclet on all files, and complains of errors. I dont care about the errors in the other files, but I know the Bean files are error free ... the same build runs properly with an ANT script. Below is the fileset part -

maven.xdoclet.ejbdoclet.fileset.0=true
maven.xdoclet.ejbdoclet.fileset.0.include=**/beans/**/*Bean.java
maven.xdoclet.ejbdoclet.fileset.0.exclude=**/xyz/beans/**/*Bean.java

The error starts like this -
Generating EJB deployment descriptor (ejb-jar.xml).
Error parsing File C:\beans\util\EJBUtils.java:Encountered "<" at line 37, column 22.
Was expecting one of:
<IDENTIFIER> ...
"[" ...

The file EJBUtils.java is being touched when its not supposed to be.

Please help me with this.

Karthik.
18 years ago
I want to write an application that can download files over http. I need to have the 'pause and resume' feature thats available in many download managers. Can someone give me the logic to achieve this with java?

Also, if I need to spawn multiple threads to download different chunks of the same file automatically, whats the logic involved? Do I have to skip those many bytes and read the stream?

Please tell me the java class (if any) which can do all this. I'm only aware of URLConnection, but not sure how to get all these things with this class.
19 years ago
StringTokenizer, from what I've heard, is very inefficient. I want to know how it compares with this split method... Even if split compiles the regex everytime, I'm OK if its faster than tokenizer.
20 years ago
Any idea if jdk 1.4's String.split() method is faster than the traditional
StringTokenizer? I'm skeptical about using the split() and replaceAll()
methods as I have a feeling they might compile the regular expression everytime, which is an expensive operation.

Please advice.
20 years ago
I didn't get any answer in java forums, so posting here....
I have a java application that runs on solaris and windows. Its started with java's -Xms and -Xmx options, with values 64 MB and 128 MB respectively. On Windows, it is starting up with 20 MB, but on solaris, it starts up with a whopping 117 MB! And after a while, it reaches 180 MB, and goes down with OutOfMemory error. All this only on solaris and not on win2k.... The code is totally independent of the platform. Does any one have a clue what could be the reason?
Also, please help me understand what exactly the Xms and Xmx options mean? Does this mean, there is a guarantee the max memory will not cross the value specified in Xmx?
Just an additional info, I used the 'top' command to monitor the mem on solaris. The virtual memory used for this process, during its startup is reported as 117 MB as I said.
This is very critical and urgent to me, so any help will be greatly appreciated.
20 years ago
I have a c++ wrapper over a java application, and c++ uses the jni library to launch a jvm, and invoke the main method of the application. I have a requirement that, when the java application exits, it has to pass the 'status code' to the wrapper somehow. By status code, I mean, "return 0" or "return 1" or something like that which we do in C's main function. But as the main method is void return type, I don't know how to handle this. Can someone help?
20 years ago
I have a java application that runs on solaris and windows. Its started with java's -Xmn and -Xmx options, with values 64 MB and 128 MB respectively. On Windows, it is starting up with 20 MB, but on solaris, it starts up with a whopping 117 MB! And after a while, it reaches 180 MB, and goes down with OutOfMemory error. All this only on solaris and not on win2k.... The code is totally independent of the platform. Does any one have a clue what could be the reason?
Also, please help me understand what exactly the Xmn and Xmx options mean? Does this mean, there is a guarantee the max memory will not cross the value specified in Xmx?
Just an additional info, I used the 'top' command to monitor the mem on solaris. The virtual memory used for this process, during its startup is reported as 117 MB as I said.
This is very critical and urgent to me, so any help will be greatly appreciated.
20 years ago
Good link man! Those Ostermiller utils look real cool!! thanks
20 years ago
The only way I can think of is, run your program, press print-screen and paste the picture in some image application, and save as jpeg
20 years ago
Yep. U getting any trouble??
20 years ago

This shouldn't be a big deal - a TimerTask is usually a fairly lightweight object. If you really want to re-use your task object for multiple schedulings for some reason


yes, that timertask object propagates to most part of my application, so my problem is not about the memory it consumes...
however, ur suggestion looks fine. I shall try that out. Thanks very much!
20 years ago
ya possible... may b it has some flag to prevent it... but i really dont want to keep creating instances of that timertask object, i just want 1 instance to pass around... anyway thanks for the reply, i think i have to resort to ur way if nothing turns out right...
20 years ago