Amos Matt

Greenhorn
+ Follow
since Mar 30, 2007
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Amos Matt

Any help on this issue please?
10 years ago
Hi All,

I have a requirement to open two popup windows from two different links and show side by side. On clicking first link first popup opens. When I click second link (on parent window), the first popup is going behind the parent window and the second popup is opening. Now the order I can see is second popup(front), parent window (middle) and first popup (behind parent window).

How can I call the first popup front on opening of second popup ? I am using google chrome.


I am using the following code to do this task, not sure where the code is going wrong...

var popup1;
var popup2;
function openPopUpWin(type){

if(type=='true'){

var url="http://"+port+"/login.html?LoginID="+loginId";

var h=850; var w = 800;
x = (w)/2, y = (h)/2;

if (screen) {
y = (screen.availHeight - h) / 2;
x = (screen.availWidth - w) / 2;
}

popup1 = window.open(url, 'popup1','scrollbars=yes, width='+w+ ',height='+h+',screenX='+x+',screenY='+y+',top='+0+',left='+0);
popup1.focus();

}else{
var url="loginservler!loginaction?loginId="+loginId;
var height =800;var width = 970;

x = (w)/2, y = (h)/2;

if (screen) {
y = (screen.availHeight - h) / 2;
x = (screen.availWidth - w) / 2;
}
popup2 = window.open(url, 'popup2','scrollbars=yes, width='+w+ ',height='+h+ ',screenX='+x+ ',screenY='+y+ ',top='+0+ ',left=' +$(window).w)/2);

popup1= window.open("",popup1);
if(popup1){
popup1.focus();
}
}
}



Any help appreciated..

Thank you
Hi,

I am having a problem with select box in IE 8. When I click on date picker the calendar opens as a popup. If the popup overlaps on the select box, the select box is getting disappeared.
It is working fine in Chrome & Mozilla.

Could some one share your suggestions to overcome this issue.

Thanks,
A
Hi All,

Could any one please provide me with a sample client and servlet side code to send audioinputstream (mp3) using UrlConnection.

Thanks alot,
Ark
14 years ago
Hi All,

I need to open an applet pop up from a servlet. I need to load the applet with an array list data.
Could you please tell me how to send data while opening the applet.

Thank you,
Amos

14 years ago
Thanks Ulf,

Just before your reply i found the problem. And what you said is the correct.
I tried putting the jar files in other JRE also. Now my applet is recognizing.

Thank you,
Amos
14 years ago
Hi Ulf,

Here is the stack trace

java.lang.NoClassDefFoundError: org/tritonus/share/sampled/AudioFileTypes
at com.kas.rdd.sound.CapPback.convertTheStream(CapPback.java:768)
at com.kas.rdd.sound.CapPback.actionPerformed(CapPback.java:483)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
throwable rg/tritonus/share/sampled/AudioFileTypes

Thanks.
14 years ago
Hi All,

I am trying to convert .wav file to .mp3 using Mp3Encoder.java given by tritonus.
I have kept tritonus_share.jar, tritonus_mp3.jar,tritonus_remaining-0.3.6.jar files under Jboss...\default\lib & under "ext" folder of Jdk. And lametritonus.dll, lame_enc.dll under Windows\system32. when i run Mp3Encoder.java on the command prompt, the input wave file is converted to .mp3.

Now i am trying to use the same conversion code in an Applet to convert the recorded .wav audioinputstream to .mp3.
below is the code...

import org.tritonus.share.sampled.AudioFileTypes;
import org.tritonus.share.sampled.Encodings;

try {
AudioFileFormat.Type targetType = AudioFileTypes.getType("MP3", "mp3");
String outFilename = "Converted" + "." + targetType.getExtension();
try {
if (AudioSystem.write(getConvertedStream(audioInputStream, Encodings.getEncoding("MPEG1L3")), targetType, new File(outFilename)) == -1) {
throw new IOException("Problems writing to file");
}
} catch (Exception ex) {
reportStatus(ex.toString());
}
}
} catch (Throwable t) {
reportStatus("Exception while converting :"+t.getMessage());
}
}//end try-catch

Here when i record the voice and try to call the above code in a method my program throwing exception as "Exception while converting : org.tritonus.share.sampled.AudioFileTypes".

I also found the exception generating by "AudioFileTypes.getType("MP3", "mp3") " call to the tritonus plugin.

Could you please tell me how to solve this problem.

Thank you,
Kanakam
14 years ago
Could you tell me the folder structure of your website project.
Hi Techies,

I have to create databases instantly when each company is created.
So, i created a template database and each time when i create new company... i am copying the template database and renaming. I can create databases. But i heard some problem like foreign key relations are not established.

Please tell me whether it is a right approach.

Thanks,
Andy
17 years ago
I think you might have give fetchType=Eager in your EJB. Try removing the fetchType, it works properly. Think it's not the JBoss Problem (not sure). You can also google for multiple bag problem.
17 years ago
Thanks Jai.....

I have deleted localDB.backup, localDB.data, localDB.lck, localDB.log files from the data/hypersonic -- folder leaving localDB.properties and localDB.script. I started the server.... now i got different error messages..

=======================================================================

15:42:15,120 INFO [SimpleThreadPool] Job execution threads will use class loader of thread: main
15:42:15,199 INFO [QuartzScheduler] Quartz Scheduler v.1.5.2 created.
15:42:15,239 INFO [RAMJobStore] RAMJobStore initialized.
15:42:15,239 INFO [StdSchedulerFactory] Quartz scheduler 'DefaultQuartzScheduler' initialized from default resource file in Quartz package: 'quartz.properties'
15:42:15,239 INFO [StdSchedulerFactory] Quartz scheduler version: 1.5.2
15:42:15,240 INFO [QuartzScheduler] Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started.
15:42:18,126 ERROR [STDERR] java.lang.IndexOutOfBoundsException
15:42:18,416 ERROR [STDERR] at java.nio.Buffer.checkBounds(Buffer.java:454)
15:42:18,416 ERROR [STDERR] at java.nio.ByteBuffer.get(ByteBuffer.java:648)
15:42:18,416 ERROR [STDERR] at java.nio.DirectByteBuffer.get(DirectByteBuffer.java:233)
15:42:18,416 ERROR [STDERR] at org.hsqldb.persist.NIOScaledRAFile.read(Unknown Source)
15:42:18,417 ERROR [STDERR] at org.hsqldb.persist.DataFileCache.readObject(Unknown Source)
15:42:18,417 ERROR [STDERR] at org.hsqldb.persist.DataFileCache.get(Unknown Source)
15:42:18,448 ERROR [STDERR] at org.hsqldb.Table$RowStore.get(Unknown Source)
15:42:18,448 ERROR [STDERR] at org.hsqldb.Table.setIndexRoots(Unknown Source)
15:42:18,448 ERROR [STDERR] at org.hsqldb.Table.setIndexRoots(Unknown Source)

15:42:19,668 ERROR [STDERR] at $Proxy5.deploy(Unknown Source)
15:42:19,668 ERROR [STDERR] at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
15:42:19,668 ERROR [STDERR] at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
15:42:19,668 ERROR [STDERR] at org.jboss.Main.boot(Main.java:200)
15:42:19,699 ERROR [STDERR] at org.jboss.Main$1.run(Main.java:464)
15:42:19,700 ERROR [STDERR] at java.lang.Thread.run(Thread.java:595)
15:42:20,412 WARN [ServiceController] Problem starting service jboss:service=Hypersonic,database=localDB
java.sql.SQLException: error in script file line: 78 S1000 General error java.lang.IndexOutOfBoundsException in statement [SET TABLE JMS_MESSAGES INDEX'46727824 46727824 46727824 0']
at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
at org.hsqldb.jdbc.jdbcConnection.<init>(Unknown Source)
at org.hsqldb.jdbcDriver.getConnection(Unknown Source)
at org.hsqldb.jdbcDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(DriverManager.java:525)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at org.jboss.jdbc.HypersonicDatabase.getConnection(HypersonicDatabase.java:761)
at org.jboss.jdbc.HypersonicDatabase.startStandaloneDatabase(HypersonicDatabase.java:611)
at org.jboss.jdbc.HypersonicDatabase.startService(HypersonicDatabase.java:557)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:417)
at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)

at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
at org.jboss.Main.boot(Main.java:200)
at org.jboss.Main$1.run(Main.java:464)
at java.lang.Thread.run(Thread.java:595)
15:42:21,401 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA' to JNDI name 'java:JmsXA'
15:42:22,558 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=MySqlDS' to JNDI name 'java:MySqlDS'
15:42:22,611 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=MySqlTS' to JNDI name 'java:MySqlTS'
15:42:22,647 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=MySqlEmployee' to JNDI name 'java:MySqlEmployee'
15:42:23,215 INFO [TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=.../deploy/jmx-console.war/
15:42:23,542 INFO [EARDeployer] Init J2EE application: file:/usr/local/PROJECT INSIDE/jboss-4.0.4/server/default/deploy/projectinside.ear/
15:42:25,342 INFO [EjbModule] Deploying OrganizationEJB
15:42:25,836 INFO [EjbModule] Deploying PIUserEJB
15:42:25,878 INFO [EjbModule] Deploying ConnectionPoolEJB
15:42:25,919 INFO [EjbModule] Deploying LoggedInUserStateEJB
15:42:28,547 INFO [Ejb3Deployment] EJB3 deployment time took: 2046
15:42:28,922 INFO [ProxyFactory] Bound EJB Home 'OrganizationEJB' to jndi 'OrganizationEJB'
15:42:28,955 WARN [EntityContainer] Could not restore ejb timers
javax.management.RuntimeMBeanException
at org.jboss.mx.interceptor.ReflectedDispatcher.handleInvocationExceptions(ReflectedDispatcher.java:176)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:163)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)


============================================================================
thanks,
Andy
17 years ago
Hi Techies,

Here i got struck with a problem while starting my jboss- 4.0.4 server.
The following are the error messages generated. It got halted for two times (commented between the lines)
--------------------------------------------------------------------------------------------------
12:47:02,224 INFO [QuartzScheduler] Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started.
12:48:21,160 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DefaultDS' to JNDI name 'java efaultDS'

*************** ----- halted almost 15-20 minutes ------ *****************

12:53:21,782 WARN [TransactionImpl] Transaction TransactionImpl:XidImpl[FormatId=257, GlobalId=NCIT-Ora/3, BranchQual=, localId=3] timed out. status=STATUS_ACTIVE

*************** ----- halted almost 15-20 minutes ------ *****************

13:04:23,717 ERROR [STDERR] java.lang.OutOfMemoryError: Java heap space
13:04:23,746 WARN [ServiceController] Problem starting service jboss.mq.destination:service=Queue,name=projectVaultLogQueue
org.jboss.mq.SpyJMSException: Could not restore messages to destination : QUEUE.schoolPortalLogQueue; - nested throwable: (java.sql.SQLException: out of memory)
at org.jboss.mq.pm.jdbc2.PersistenceManager.internalRestoreQueue(PersistenceManager.java:602)
at org.jboss.mq.pm.jdbc2.PersistenceManager.restoreQueue(PersistenceManager.java:514)
at org.jboss.mq.server.JMSQueue.<init>(JMSQueue.java:65)
at org.jboss.mq.server.jmx.Queue.startService(Queue.java:78)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:417)

Caused by: java.sql.SQLException: out of memory
at org.hsqldb.jdbc.Util.throwError(Unknown Source)
at org.hsqldb.jdbc.jdbcPreparedStatement.executeQuery(Unknown Source)
at org.jboss.resource.adapter.jdbc.CachedPreparedStatement.executeQuery(CachedPreparedStatement.java:90)
at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:236)
at org.jboss.mq.pm.jdbc2.PersistenceManager.internalRestoreQueue(PersistenceManager.java:550)
... 118 more
13:04:24,148 INFO [A] Bound to JNDI name: queue/A
13:04:24,153 INFO [B] Bound to JNDI name: queue/B
13:04:24,163 INFO [C] Bound to JNDI name: queue/C
13:04:24,166 INFO [D] Bound to JNDI name: queue/D
13:04:24,176 INFO [ex] Bound to JNDI name: queue/ex
13:04:24,249 INFO [testTopic] Bound to JNDI name: topic/testTopic
13:04:24,257 INFO [securedTopic] Bound to JNDI name: topic/securedTopic
-----------------------------------------------------------------------------------------------

Please give me the solution.
Thanks
Andy
17 years ago
Thanks Ben....

For security reason i dont want to take out the jsp from WEB-INF.
So, please help me out in... a creating controller servlet.

Thanks
17 years ago
JSP
The following is the existing code ... working fine...

<FRAMESET rows="10%,*" framespacing="0" border="false" frameborder="0" frameborder="no">

<frame src="<%= request.getContextPath() %>/jsp/Header.jsp" name="Header" scrolling="NO" noresize>

<frameset cols="17%,*" framespacing="0" border="false" frameborder="0" frameborder="no">

<FRAME SRC="<%= request.getContextPath() %>/jsp/LeftNav.jsp" NAME="LeftNav" MARGINWIDTH=0 MARGINHEIGHT=0 SCROLLING=no NORESIZE>

<FRAMESET rows="9%,8%,*" framespacing="0" border="false" frameborder="0" frameborder="no">

<FRAME SRC="<%= request.getContextPath() %>/jsp/MainNav.jsp" NAME="Main" MARGINWIDTH=0 MARGINHEIGHT=0 SCROLLING=no>

<FRAME SRC="<%= request.getContextPath() %>/jsp/SubNav.jsp" NAME="SubNav" SCROLLING=no>

<FRAME SRC="<%= request.getContextPath() %>/jsp/BodyNav.jsp" NAME="BodyNav" NORESIZE>

</FRAMESET>

</FRAMESET>

</FRAMESET>

here i moved... the jsp page to /WEB-INF/jsp/sys/ folder.

now i changed the code
<frame src="<%= request.getContextPath() %>/jsp/Header.jsp" name="Header" scrolling="NO" noresize> to
<frame src="<%= request.getContextPath() %>/WEB-INF/jsp/sys/Header.jsp" name="Header" scrolling="NO" noresize> ... for all jsps.

It is not working... the pages are not loading.
Please... somebody help me.
Thanks
17 years ago
JSP