manasa manogna

Greenhorn
+ Follow
since Mar 29, 2011
Bangalore
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
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by manasa manogna

Hi Friends

Need a help with one of the java swing challenge I am facing. Problem statement: there are two JPanels panel 1 and panel 2 placed on a JFrame one below the other as panel 2 below panel 1. Now, I need to put a JButton in any one of the panels such that this JButton displays half in panel 1 and half in panel 2. Please help me how I can do this?

Thanks
Hemanth
4 years ago
Hi All

I am facing a situation where I am facing the error "error unmarshalling arguments". Context is, I hava a java process running on a remote machine and from other machine, I am trying to get the object reference of the process running on remote machine using RMI. After succesfully getting the remote object reference, I am trying to invoke a remote procedure using this remote object reference using the same RMI. while invoking the remote method, I am getting the exception like "error unmarshalling arguments". Interestingly, the remote method which I am trying to invoke will not take any arguments. The call is something like "RemoteProcessReferenceObject.methodName()". In this case, I am getting OptionalDataException as nested exception. I am new to RMI concepts. Please guide me how to solve this issue. Mainly I am confusing why I need to get this OptionalDataException followed by error unmarshalling arguments when I am calling the Remote method which don't take any arguments at all? (I Understand that OptionalDataException will occur when we are trying to read an object on server side and this object data is followed by primitive data but in first place why RMI considers it a problem if a primitive data is passed after an object data and in this case, even though there are no arguments what it is trying to unmarshall). Please help me to understand the deep concept of this RMI parameter unmarshalling.
4 years ago
Hi

I know Servlets, JSP, Struts, Hibernate, HTML, CSS, XML, XSLT, SQL and had worked with application servers like weblogic.

Thanks
Hemanth
5 years ago
Hi

I am a java developer with 6 years of experience. I am very much interested in this opportunity. Please provide me further details.

Thanks & Regards
Hemanth
5 years ago
Hi

I am a senior java developer with 6 years of experience with main focus on core java and supporting technologies. I am desperatly looking for freelance java work. I can develop applications with good quality and strict deadlines are maintained. Will be available for communication through skype. Please contact me if any projects are available. can call to +91-9980332234 and can contact on java.swing.developer@gmail.com.
5 years ago
Hi friends

I am trying to develop a tool to extract MSI file contents in Java. I am googling to find the ways how to achieve this. I am finding tools to extract MSI contents which are developed in some other programming languages and all are available in exe formats. I dont want to use those exe files but to develop one tool purely in java. Please guide how to approach to achieve this task and is there any free third party libraries available for the same. If not, how to develop one and what may be the internal structure of a msi file. please help me to know the complete details about msi file format and how to handle this format with java. I emphasize this file should be purely manipulated using java and nothing else. Please guide me.
6 years ago
Hi Rob

Thank you very much for the example. It solved my problem. Thanks once again.
6 years ago
Hi Rob

Thank you for the suggestion. Can you please help me how to achieve this with a piece of code please. I am trying to google the same but not getting satisfactory solution to achieve.
6 years ago
Hi maneesh

At line 58 of EXEFile, I am calling the statement textArea.setText(getHex(getBytesFromFile(fileName))). Here textArea is an object of JTextArea and I have set the following properties for textArea.



6 years ago
Hi

I am trying to read the content of EXE file and convert that into HEX Representation. After getting the hex representation as string, I am trying to place that text into JTextArea. But I am getting OutOfMemory Error while attempting to do this. below is the code I am trying



In the above code, I am using readBytesFromFile method to read the content of the exe file and getHex to convert this byte[] into hex string representation. I am trying to place this string in JTextArea using JTextArea.setText() method. But I am getting the OutOfMemory Error. Below is the error I am receiving

File length: 4518720 Maximum Length: 2147483647

Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space
at javax.swing.text.WrappedPlainView$WrappedLine.breakLines(WrappedPlainView.java:782)
at javax.swing.text.WrappedPlainView$WrappedLine.update(WrappedPlainView.java:717)
at javax.swing.text.WrappedPlainView$WrappedLine.insertUpdate(WrappedPlainView.java:708)
at javax.swing.text.WrappedPlainView.insertUpdate(WrappedPlainView.java:455)
at javax.swing.plaf.basic.BasicTextUI$RootView.insertUpdate(BasicTextUI.java:1590)
at javax.swing.plaf.basic.BasicTextUI$UpdateHandler.insertUpdate(BasicTextUI.java:1849)
at javax.swing.text.AbstractDocument.fireInsertUpdate(AbstractDocument.java:185)
at javax.swing.text.AbstractDocument.handleInsertString(AbstractDocument.java:734)
at javax.swing.text.AbstractDocument.insertString(AbstractDocument.java:693)
at javax.swing.text.PlainDocument.insertString(PlainDocument.java:114)
at javax.swing.text.AbstractDocument.replace(AbstractDocument.java:655)
at javax.swing.text.JTextComponent.setText(JTextComponent.java:1693)
at SupportFiles.EXEFile.createAndDisplayGUI(EXEFile.java:58)
at SupportFiles.EXEFile$1.run(EXEFile.java:33)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

Can you please help me to solve this issue.
6 years ago
Hi Friends

Recently, in an interview, I faced a question like what is the difference between deep copy and shallow copy. And they asked to give a real time example of this concept usage. Can you please help me to know the exact difference between Deep copy and Shallow copy with a real time example.
6 years ago
In this case, you can use split method. One more alternative is to use the Scanner and it's splitting functionality where you can specify the delimiters. Using scanner, you can easily read in the text you want one line at a time and then split it. Next, you can read each word and store it in a String array. Now you are ready to play with the words so that perform any operation of your wish.
6 years ago
Hi Friends

To explain the context, I need to make a mobile application to be available for the users to download into their mobile phones. For this, I created a war file which contains a JAD file, JAR file and a html file which contains link to the JAD file. Now I deployed this WAR file in weblogic application server. I am trying to click on the link available in html page which is located in the WAR and on clicking this link I should download the JAD file. But, it is not happening like that. Instead of downloading, the content of the file is shown in HTML page. Please assist how I can achieve this in WAR file such that I can download the JAD and Jar files using the html from WAR. for extra info, I also specified the mime-type mapping for JAD and JAR in web.xml which is located in WEB-INF then also it is not working. Early response will be great for me.
6 years ago
Hi Shekar

Thanks for the response. I got this issue resolved. As you said this is related to configuration problem only. In weblogic ejb jar xml file I misunderstood about destination jndi name as the jndi that points to Connection factory but it actually refers the destination queue. Once I changed this mapping from ACF to queue, it is working fine. Thanks
7 years ago
Hi

I am trying to establish the JMS connections from one weblogic server JMS to another application server JMS. I configured a connection factory and queue in first application server. I configured the Foreign server also in the first server and specified the connection factory and queues which are created in the second application server as part of the Foreign server configuration. I have few jars like SampleMDB and some others which are having the configuration properties set in them and I deployed them onto my JMS Server.

I have all the related connection factories and queues configured in the second application server also. now, when I am trying to bring the managed server, in log file it is showing the above said error. Please find below the exception it is showing.

Unable to deploy EJB: sampleMDB from sampleMDB.jar:

Error getting JMSServer member info


at weblogic.ejb.container.deployer.EJBModule.activate(EJBModule.java:501)
at weblogic.application.internal.flow.ModuleListenerInvoker.activate(ModuleListenerInvoker.java:227)
at weblogic.application.internal.flow.DeploymentCallbackFlow$2.next(DeploymentCallbackFlow.java:415)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83)
at weblogic.application.internal.flow.DeploymentCallbackFlow.activate(DeploymentCallbackFlow.java:75)
at weblogic.application.internal.flow.DeploymentCallbackFlow.activate(DeploymentCallbackFlow.java:67)
at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:1267)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83)
at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:409)
at weblogic.application.internal.SingleModuleDeployment.activate(SingleModuleDeployment.java:39)
at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)
at weblogic.deploy.internal.targetserver.BasicDeployment.activate(BasicDeployment.java:184)
at weblogic.deploy.internal.targetserver.BasicDeployment.activateFromServerLifecycle(BasicDeployment.java:361)
at weblogic.management.deploy.internal.DeploymentAdapter$1.doActivate(DeploymentAdapter.java:51)
at weblogic.management.deploy.internal.DeploymentAdapter.activate(DeploymentAdapter.java:196)
at weblogic.management.deploy.internal.AppTransition$2.transitionApp(AppTransition.java:30)
at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:233)
at weblogic.management.deploy.internal.ConfiguredDeployments.activate(ConfiguredDeployments.java:169)
at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:123)
at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:173)
at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:89)
at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)

Caused By: Error getting JMSServer member info NestedException Message is :weblogic.jms.client.JMSXAConnectionFactory cannot be cast to javax.jms.Destination
at weblogic.ejb.container.deployer.MessageDrivenBeanInfoImpl.createMDManagers(MessageDrivenBeanInfoImpl.java:1341)
at weblogic.ejb.container.deployer.MessageDrivenBeanInfoImpl.activate(MessageDrivenBeanInfoImpl.java:1092)
at weblogic.ejb.container.deployer.EJBDeployer.activate(EJBDeployer.java:1324)
at weblogic.ejb.container.deployer.EJBModule.activate(EJBModule.java:480)
at weblogic.application.internal.flow.ModuleListenerInvoker.activate(ModuleListenerInvoker.java:227)
at weblogic.application.internal.flow.DeploymentCallbackFlow$2.next(DeploymentCallbackFlow.java:415)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83)
at weblogic.application.internal.flow.DeploymentCallbackFlow.activate(DeploymentCallbackFlow.java:75)
at weblogic.application.internal.flow.DeploymentCallbackFlow.activate(DeploymentCallbackFlow.java:67)
at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:1267)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83)
at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:409)
at weblogic.application.internal.SingleModuleDeployment.activate(SingleModuleDeployment.java:39)
at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)
at weblogic.deploy.internal.targetserver.BasicDeployment.activate(BasicDeployment.java:184)
at weblogic.deploy.internal.targetserver.BasicDeployment.activateFromServerLifecycle(BasicDeployment.java:361)
at weblogic.management.deploy.internal.DeploymentAdapter$1.doActivate(DeploymentAdapter.java:51)
at weblogic.management.deploy.internal.DeploymentAdapter.activate(DeploymentAdapter.java:196)
at weblogic.management.deploy.internal.AppTransition$2.transitionApp(AppTransition.java:30)
at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:233)
at weblogic.management.deploy.internal.ConfiguredDeployments.activate(ConfiguredDeployments.java:169)
at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:123)
at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:173)
at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:89)
at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)



I am not understanding why this is occurring. Please help in this aspect. please find below the config i did in ejb-jar.xml and weblogic-ejb-jar.xml:

<ejb-jar
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd"
version="2.1">
<enterprise-beans>
<message-driven>
<ejb-name>SampleMDB</ejb-name>
<ejb-class>sample/sample1/sample2/sample3/sample</ejb-class>
<transaction-type>Container</transaction-type>
<activation-config>
<activation-config-property>
<activation-config-property-name>subscriptionDurability</activation-config-property-name>
<activation-config-property-value>NonDurable</activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>acknowledgeMode</activation-config-property-name>
<activation-config-property-value>dups-ok-acknowledge</activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>destinationType</activation-config-property-name>
<activation-config-property-value>javax.jms.Queue</activation-config-property-value>
</activation-config-property>
</activation-config>
<env-entry>
<description> Name of this application. </description>
<env-entry-name>ABCDEFGHIJKL</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>ANY</env-entry-value>
</env-entry>
</message-driven>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>SampleMDB</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>NotSupported</trans-attribute>
</container-transaction>
</assembly-descriptor>


</ejb-jar>

and

<weblogic-ejb-jar
xmlns="http://www.bea.com/ns/weblogic/90" xmlns:j2ee="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.bea.com/ns/weblogic/90 http://www.bea.com/ns/weblogic/90/weblogic-ejb-jar.xsd">
<weblogic-enterprise-bean>
<ejb-name>SampleMDB</ejb-name>
<message-driven-descriptor>
<pool>
<max-beans-in-free-pool>200</max-beans-in-free-pool>
<initial-beans-in-free-pool>20</initial-beans-in-free-pool>
</pool>
<destination-jndi-name>MYQCF</destination-jndi-name>
<connection-factory-jndi-name>MYQCF</connection-factory-jndi-name>
</message-driven-descriptor>
<transaction-descriptor>
<trans-timeout-seconds>0</trans-timeout-seconds>
</transaction-descriptor>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>



In the above config, MYQCF is the connection factory which i am referring to the connection factory in second application server. For your info, the connection factories created in both the servers are XA enabled.
Please help as it quite stuck the work to proceed further.
7 years ago