Abdul Basit Munda

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

Recent posts by Abdul Basit Munda

Hi i m trying to use one of the webservices, for some odd reason it is giving me problem, i know for sure that login service which i m trying to use is perfectly fine because i used it somewhere else and it works. here is the error i get

and my code to use this service is

14 years ago
Hi ,
I was writing schema and i was thinking if this is allowed in Schema:
I want to make sure that there is some text the opening and closing of elements. For example

<data> hello </data>


I want to make sure there is some text between opening and closing tag of data. Just making sure its not null, in this way i know all the time i have no null text coming from xml

Thanks a lot
Hi all,
I have a question regarding XML Schema, i wanted to know is there a possibility to write conditions in schema , for example i have xml like this

<carType type="honda>
<carType type="toyota">
<headlights> fancy</headlights>

so my schema should check if the car type is honda then you are allowed
elements with name crazydoors but if your attribute is toyota then you can have elements such as headlights???

Ummmm however the only problem is each component have to parse differently , so suppose i have component A and component B , and i have two modesl model A and model B , similarly i have two different way of describing values for each of the component A and component B , so i was wondering , then i would need two differnt kind of parsers so if i have x components i will need x parsers??
is there any other better way to do it?

Thanks for the reply, well UI doesn't know really anything about XML, it take the valuse from its model and the model does all the parsing of XML and then tell the view by firing event that model changed so UI updates it self.

So i dont know if still it considered to be inappropriate design?

I am having problem figuring out that , is there any pattern i can use for my problem to make nicer design. Here is my problem

My Application is based on components these are custom swing components. There is a MainComponent which contains subcomponents and each sub component can contain other subcomponents. Now suppose if i want the data in each component to be thrown out as an xml. what i do is i call method "toXML" on maincomponent and it does the traversing through subcomponents and call toXML method on each of them. All of these components are using interface AbstractComponent which contains method toXML.

So similarly if i want to set data on the componenet , data is taken from Xml, i will just call setData on maincomponent and then the maincomponent setData will be responsible for traversing through its subcomponent and calling setData method.

Umm i not sure ..if i m doing this way is a most efficient in terms of design? if you can recommend me any design pattern or you think this design is good??

Thanks a lot
Hi ,
I have a question regarding packaging and loading classes from seperate jar files. I have some interface classes in one package ( jar file) and implementation classes in other jar file. Now the problem is the package ( jar ) file containing interfaces has to call implementation class which is in seperate jar . Only thing i suppose to know is the implemented class name and nothing else. I am not sure , how will i be able to do that .

Any Help will be greatly appreciated
Thanks a lot
14 years ago
Hi ,
I am getting this weird if i try to do a transformation from an xslt to xml
here is the error i get
"com.sun.org.apache.bcel.internal.generic.ClassGenException: Branch target offset too large for short
at com.sun.org.apache.bcel.internal.generic.BranchInstruction.dump(BranchInstruction.java:99)
at com.sun.org.apache.bcel.internal.generic.InstructionList.getByteCode(InstructionList.java:980)
at com.sun.org.apache.bcel.internal.generic.MethodGen.getMethod(MethodGen.java:587)
at com.sun.org.apache.xalan.internal.xsltc.compiler.Mode.compileNamedTemplate(Mode.java:581)
at com.sun.org.apache.xalan.internal.xsltc.compiler.Mode.compileTemplates(Mode.java:591)
at com.sun.org.apache.xalan.internal.xsltc.compiler.Mode.compileApplyTemplates(Mode.java:843)
at com.sun.org.apache.xalan.internal.xsltc.compiler.Stylesheet.compileModes(Stylesheet.java:615)
at com.sun.org.apache.xalan.internal.xsltc.compiler.Stylesheet.translate(Stylesheet.java:730)
at com.sun.org.apache.xalan.internal.xsltc.compiler.XSLTC.compile(XSLTC.java:335)
at com.sun.org.apache.xalan.internal.xsltc.compiler.XSLTC.compile(XSLTC.java:410)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:791)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:619)
at com.sun.sleuth.services.OCATReportGenerator.fileOperation(Unknown Source)
at com.sun.sleuth.omcmweb.model.dao.jdbc.ProjectDaoJdbcImpl.getProjectReport(Unknown Source)
at com.sun.sleuth.omcmweb.model.service.impl.ProjectServiceImpl.getReport(Unknown Source)
at com.sun.sleuth.webservices.server.impl.ProjectWebServiceImpl.getReport(Unknown Source)
at com.sun.sleuth.webservices.server.ProjectWebService__Project_Service__Tie.invoke_getReport(ProjectWebService__Project_Service__Tie.java:54)
at com.sun.sleuth.webservices.server.ProjectWebService__Project_Service__Tie.processingHook(ProjectWebService__Project_Service__Tie.java:295)
at com.sun.xml.rpc.server.StreamingHandler.handle(StreamingHandler.java:333)
at com.sun.xml.rpc.server.http.JAXRPCServletDelegate.doPost(JAXRPCServletDelegate.java:448)
at com.sun.xml.rpc.server.http.JAXRPCServlet.doPost(JAXRPCServlet.java:102)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:535)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:790)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:709)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:572)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:644)
at java.lang.Thread.run(Thread.java:534)
ERROR: 'Branch target offset too large for short'
FATAL ERROR: 'Could not compile stylesheet'
Error in Report Generation Process
Could not compile stylesheet"

Here is the code which i m trying to run

StreamResult result = new StreamResult(new StringWriter());
System.out.println(" TransformFactory method applied");
System.out.println(" Rtemp Absolute Path " + rTemp.getAbsoluteFile().getAbsolutePath());

//This is the line causing error
Transformer transformer = TransformerFactory.newInstance().newTransformer(new

System.out.println("Created Transformer");
transformer.transform(new StreamSource(content_xml.openStream()), result);
System.out.println("Applying transformation");
System.out.println(" Writing bytes");
byte [] rbytes = (result.getWriter()).toString().getBytes("UTF-8");"

I know that when i try to create transform object it give me reason and i know that error is due to the big xslt file but i have no idea how to solve it . I cant shorten my xslt because its very painful my xslt is 2000 lines(approx 121 kb) .If you guys can tell me any solution please do so

Thanks a lot
HI ,
I was wondering if anyone of you has passed scjp 1.5 and help me in finding resources for prep, there are no books availaible , so if u guys can help me to prepare for it. if you know exam cram books or exam prep resouces please post it over here
Can anyone of you tell me , how can we maintain states between two web services. The problem on hand is i have one login service and one project service, Now user should be able to login using login service and then use the project service, so i need some kind of session management between login service and project service. I know how to maintain session in individual services, but i m not sure how can i have the same session used between both the services, Any other ideas to solve the problem will be appreciated too

Thanks for your help
15 years ago