Sridhar Venkat

Greenhorn
+ Follow
since Aug 11, 2003
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 Sridhar Venkat

Hello,
I am currently working on adding i18l and l10n support to some software and I'm having some trouble with setting titles for JFrames. If the locale is set as Korean then JFrame titles are displayed as question marks and not the gicen korean text. Labels and buttons display the korean text properly. The only problem is with JFrames. Is there any way to get around this?
Thanks
Sridhar
14 years ago
Living in India which is so amazingly diverse, I've had to learn quite a few different languages. I've found that learning from a book can get really boring. Try speaking in the language to other people who know the language, but don't treat it as practice..try assuming that the only way you can communicate is by using that particular language. Watching television programs in the language helps a lot..plus it's fun.
Sridhar
14 years ago
How tragic....
You sorted it out just before I posted ...sigh...

Sridhar
14 years ago
It might be better to store the data you have as floats instead of text. The RandomAccessFile class has a writeFloat(float) method which writes floats to a file using 4 bytes per float. You could use the Float.parseFloat(String ) method to convert a string into a float.
To access a number in the middle of the file you have to use the
RandomAccessFile.seek(long) method to move the file pointer to the required location. If all the data in your file was written as floats and you wanted to access the nth float you would just have to do

Just remember to take care of the exceptions readFloat() throws.
Go through the RandomAccesFile javadocs before you start off..
Hope this helps
Sridhar
14 years ago


Imagine that the file you're reading is a log file of an active Web server. One read might return 0 because there's no more data to read. The next read might return more data.


That is definitely a possibility, but the file that will be opened will be a copy of the original file and so that particular case is avoided.
Thanks ( I hadn't thought of this )
Sridhar
14 years ago
I have the following snippet of code I'm using in a program and I wanted to know if there could be a situation in which the read method of FileInputStream would return 0 as the number of bytes read even though there is data available. ( What I was thinking of was a situation in which an exception is not thrown, but read just returns 0 , and the next read succeeds in the reading the data ). Could this happen due to buffer's getting filled up in Linux/Unix ??
If such a situation could arise then the code below would be vulnerable.

Thanks
Sridhar
14 years ago
I managed to fix the problem.
Sridhar
14 years ago
Check your classpath and see if the .jar file containing the OracleDriver class is in the classpath. If it isn't then add it to the classpath. You can check the classpath variable on windows by using this command
echo %CLASSPATH%
if the output is
%CLASSPATH%
then you need to do this :
set CLASSPATH=%CLASSPATH%;<full path of the .jar file with the OracleDriver class>
Run javac after this
Hope this helps....
(You can find the .jar file by running a search in windows for files containing text : OracleDriver.class)
Sridhar
14 years ago
You could use Java sockets and the SMTP protocol to send emails. Check out this link
[EMAIL]http://www.developerfusion.com/show/1975/[/EMAIL]
Sridhar
14 years ago
Thanks a lot, I'll check out ANTLR and JavaCC.
Another thing though...
I was doing a Google search and I came across BYacc. The homepage says normal yacc code can be reused and that it generates Java source for a parser. If anybody has some feedback about the effectiveness of BYacc vis-a-vis ANTLR, I'd be grateful.
Thanks,
Sridhar
14 years ago
I need to cook up a C parser written in Java and writing the lexer and parser from scratch would be painful, so if anybody knows of parser generators that output Java code ( like yacc ) and a lexer generator that output's Java code I'd be grateful
thanks
Sridhar
14 years ago
Hi,
I have an EJB that I've deployed on Sybase EAServer, JBoss and BEA Weblogic and it works fine on those three...now i've got to deploy it on the Websphere app server v 5.0 . I used the AAT to create a new application with just one module ..my EJB , and generated the deployment code using AAT. I used wsadmin to install the application... the problem is I cant get the application to run... the errors show in the log file are given at the end of this message.
websphere doesnt seem to be able to open the application.xml file for my application even though it exists and is in the required directory. Could somebody help me out ??
thanks in advance ....

[8/11/03 14:14:24:937 GMT+05:30] 29935232 ApplicationMg W WSVR0100W: An error occurred initializing, TBanker
com.ibm.ws.exception.ConfigurationWarning: Failed to open e:\Program Files\WebSphere\AppServer\config\cells\ganesh\applications\TBanker.ear\deployments\TBanker
at com.ibm.ws.runtime.component.DeployedApplicationImpl.initialize(DeployedApplicationImpl.java:390)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.initializeApplication(ApplicationMgrImpl.java:135)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:444)
at java.lang.reflect.Method.invoke(Native Method)
at com.tivoli.jmx.modelmbean.MMBInvoker.invoke(MMBInvoker.java:46)
at com.tivoli.jmx.modelmbean.MMBInvoker.invokeOperation(MMBInvoker.java:115)
at com.tivoli.jmx.modelmbean.DynamicModelMBeanSupport.invoke(DynamicModelMBeanSupport.java:409)
at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:323)
at com.tivoli.jmx.GenericMBeanSupport.invoke(GenericMBeanSupport.java:178)
at com.tivoli.jmx.MBeanAccess.invoke(MBeanAccess.java:113)
at com.tivoli.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:290)
at com.ibm.ws.management.AdminServiceImpl.invoke(AdminServiceImpl.java:655)
at com.ibm.ws.console.core.mbean.MBeanHelper.invoke(MBeanHelper.java:137)
at com.ibm.ws.console.appdeployment.ApplicationDeploymentCollectionAction.perform(ApplicationDeploymentCollectionAction.java:239)
at org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.java:1791)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1586)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:258)
at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:872)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:491)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:173)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:79)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:199)
at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:182)
at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:331)
at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:432)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:343)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:592)
---- Begin backtrace for nested exception
com.ibm.etools.archive.exception.DeploymentDescriptorLoadException: META-INF/application.xml
Stack trace of nested exception:
com.ibm.etools.archive.exception.ResourceLoadException: IWAE0007E Could not load resource "META-INF/application.xml" in archive "e:\Program Files\WebSphere\AppServer\config\cells\ganesh\applications\TBanker.ear\deployments\TBanker"
Stack trace of nested exception:
com.ibm.etools.archive.exception.ArchiveRuntimeException: Invalid binaries path: e:\Program Files\WebSphere\AppServer/installedApps/ganesh/TBanker.ear
at com.ibm.etools.archive.impl.LoadStrategyImpl.checkLoosePathsValid(LoadStrategyImpl.java:358)
at com.ibm.etools.archive.impl.LoadStrategyImpl.setLooseArchive(LoadStrategyImpl.java:343)
at com.ibm.etools.archive.impl.DirectoryArchiveLoadStrategyImpl.getLooseArchive(DirectoryArchiveLoadStrategyImpl.java:45)
at com.ibm.etools.archive.impl.LoadStrategyImpl.primGetResourcesPath(LoadStrategyImpl.java:133)
at com.ibm.etools.archive.impl.LoadStrategyImpl.initializeContext(LoadStrategyImpl.java:241)
at com.ibm.etools.archive.impl.LoadStrategyImpl.getContext(LoadStrategyImpl.java:160)
at com.ibm.etools.archive.impl.LoadStrategyImpl.getResourceSet(LoadStrategyImpl.java:232)
at com.ibm.etools.archive.impl.LoadStrategyImpl.getMofResource(LoadStrategyImpl.java:222)
at com.ibm.etools.commonarchive.impl.ArchiveImpl.getMofResource(ArchiveImpl.java:528)
at com.ibm.etools.commonarchive.impl.ModuleFileImpl.getDeploymentDescriptorResource(ModuleFileImpl.java:65)
at com.ibm.etools.archive.impl.XmlBasedImportStrategyImpl.primLoadDeploymentDescriptor(XmlBasedImportStrategyImpl.java:35)
at com.ibm.etools.archive.impl.Ear12ImportStrategyImpl.loadDeploymentDescriptor(Ear12ImportStrategyImpl.java:74)
at com.ibm.etools.archive.impl.Ear12ImportStrategyImpl.importMetaData(Ear12ImportStrategyImpl.java:69)
at com.ibm.etools.commonarchive.impl.EARFileImpl.getDeploymentDescriptor(EARFileImpl.java:411)
at com.ibm.etools.commonarchive.impl.EARFileImpl.initializeModuleExtensions(EARFileImpl.java:789)
at com.ibm.etools.commonarchive.impl.EARFileImpl.initializeAfterOpen(EARFileImpl.java:780)
at com.ibm.etools.commonarchive.impl.CommonarchiveFactoryImpl.openSpecificArchive(CommonarchiveFactoryImpl.java:633)
at com.ibm.etools.commonarchive.impl.CommonarchiveFactoryImpl.openEARFile(CommonarchiveFactoryImpl.java:469)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.open(DeployedApplicationImpl.java:168)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.initialize(DeployedApplicationImpl.java:386)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.initializeApplication(ApplicationMgrImpl.java:135)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:444)
at java.lang.reflect.Method.invoke(Native Method)
at com.tivoli.jmx.modelmbean.MMBInvoker.invoke(MMBInvoker.java:46)
at com.tivoli.jmx.modelmbean.MMBInvoker.invokeOperation(MMBInvoker.java:115)
at com.tivoli.jmx.modelmbean.DynamicModelMBeanSupport.invoke(DynamicModelMBeanSupport.java:409)
at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:323)
at com.tivoli.jmx.GenericMBeanSupport.invoke(GenericMBeanSupport.java:178)
at com.tivoli.jmx.MBeanAccess.invoke(MBeanAccess.java:113)
at com.tivoli.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:290)
at com.ibm.ws.management.AdminServiceImpl.invoke(AdminServiceImpl.java:655)
at com.ibm.ws.console.core.mbean.MBeanHelper.invoke(MBeanHelper.java:137)
at com.ibm.ws.console.appdeployment.ApplicationDeploymentCollectionAction.perform(ApplicationDeploymentCollectionAction.java:239)
at org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.java:1791)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1586)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:258)
at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:872)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:491)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:173)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:79)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:199)
at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:182)
at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:331)
at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:432)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:343)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:592)
14 years ago
create the jboss.xml DD for jboss , add it to your meta-inf dir and make the jar file for the EJB.. then just copy it to the
%JBOSS_HOME%\server\default\deploy directory....restart the server...and voila!!...
although this might be a slight hack...