This document was generated from CDN thread
Created by: Dan Coffey on 22-05-2009 07:09:13 PM
I've taken over the development of some code.
The demo japplet (old code) works to a Call Manager through a VPN.
I don't have the source that was used to create the demo applet, I have older code.
The source code and the older demo.jar japplet don't have the same behavior.
Looks like the earlier developer (now gone) did not give up the last source code.
I've added to the source to process Exceptions.
I'm using:
NetBeans IDE 6.5.1
Windows XP Professional SP3
Java SE Dev Kit 6 Update 12
VPN connection to the Call Manager.
Running the updated Japplet in NetBeans, I don't get and any Exceptions. All seems to work.
When I run the new codes compiled Demo.jar in the dist directory I get the following errors.
Any Idea what's wrong? Any help will be appreciated
Thanks,
Dan
Java code: Init() called from CiscoCallManager Constructor
Provider provider;
line 85 JtapiPeer peer = JtapiPeerFactory.getJtapiPeer(null);
line 86 String providerString = providerName + ";login=" + login + ";passwd=" + password;
line 87 trace.println ( "Opening connection to: " + providerString);
line 88 provider = peer.getProvider(providerString);
Java Console Output:
Opening connection to: 192.168.5.58;login=jtapiuser;passwd=passw0rd
...
java.security.AccessControlException: access denied (java.io.FilePermission . read)
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkRead(Unknown Source)
at java.io.File.exists(Unknown Source)
at com.cisco.services.tracing.LogFileTraceWriter.CTQF(CTQF)
at com.cisco.services.tracing.LogFileTraceWriter.<init>(CTQF)
at com.cisco.services.tracing.LogFileTraceWriter.<init>(CTQF)
at com.cisco.jtapi.TraceModuleImpl.I(CTQF)
at com.cisco.jtapi.ProviderImpl.<init>(CTQF)
at com.cisco.jtapi.CiscoJtapiPeerImpl.getProvider(CTQF)
at com.voip.CiscoCallManager.initialize(CiscoCallManager.java:88)
at com.voip.CiscoCallManager.<init>(CiscoCallManager.java:70)
at com.demo.VoIPGUI$2.run(VoIPGUI.java:196)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(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)
Subject: RE: Exception at com.cisco.jtapi.CiscoJtapiPeerImpl.getProvider(CTQF)
Replied by: David Staudt on 22-05-2009 09:35:58 PM
From the exception, it looks like the JTAPI tracing function is unable to read/write trace log files. If so, you could either enable to proper file access permissions for the applet (for example directory read/write in the working directory of the app) or attempt to disable JTAPI logging.
Note, JTAPI logging can be enabled in the jtapi.ini file, or it can be activated in JTAPI code using the jtrace.jar.
Subject: RE: Exception at com.cisco.jtapi.CiscoJtapiPeerImpl.getProvider(CTQF)
Replied by: Dan Coffey on 23-05-2009 12:51:00 AM
Thanks, for the information.
I've checked the permissions and I ran the older demo.jar applet again with no error messages, so that applet is not having IO problems.
I then replaced the old demo.jar with the new demo.jar and ran the applet and got the same errors. So the old to runs and the new fails.
I tried to run the applet in the dist folder and got the same errors.
I was able to run the new applet this morning and then made a few more changes to the source. I back out those change but I'm still getting the errors.
I don't see any log files being created in the directory that the demo.jar is.
Are these files in another directory?
Subject: RE: Exception at com.cisco.jtapi.CiscoJtapiPeerImpl.getProvider(CTQF)
Replied by: Dan Coffey on 26-05-2009 05:51:07 PM
Thanks that helped.
I've some how turned on the traceing behavior in my java code.
The reason it work in NetBeans is that NetBeans has access to the file system and is allowing the CiscoJtapi07 text files to be created.
The applet does not have access to the file system.
Do you know how I can turn off the Jtapi tracing behavior in my java code?
Dan
Subject: RE: Exception at com.cisco.jtapi.CiscoJtapiPeerImpl.getProvider(CTQF)
Replied by: David Staudt on 26-05-2009 07:24:56 PM
If jtapi.ini is not being used to configure JTAPI tracing, then it's likely the application is generating its own file tracing or possibly using the Cisco jtrace.jar classes (part of the JTAPI SDK) to control JTAPI tracing programmatically. If the latter, and the app developer did not provide any facilities for specifying trace level (say via CLI parameter or config file) then you may not be able to disable tracing.