aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes Problem on Applet connecting to JMS Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Problem on Applet connecting to JMS" Watch "Problem on Applet connecting to JMS" New topic
Author

Problem on Applet connecting to JMS

Patrick Kwan
Greenhorn

Joined: Mar 31, 2003
Posts: 2
Dear all,
I need to send a JMS message to a topic from a applet. I am using Weblogic 7 sp1 and its JMS Server. The applet is signed and given all-permission in .java.policy (and also <all-permission> in jnlp). I got the following exception whenever I try to call factory.createTopicConnection()
weblogic.jms.common.JMSException: Error creating connection on the server
at weblogic.jms.client.JMSConnectionFactory.createConnection(JMSConnectionFactory.java:126)
at weblogic.jms.client.JMSConnectionFactory.createTopicConnection(JMSConnectionFactory.java:80)
at cargoPoster(CargoMonitor.java:65)
...
----------- Linked Exception -----------
java.rmi.MarshalException: failed to marshal connectionCreate(Lweblogic.jms.dispatcher.DispatcherWrapper ; nested exception is:
java.rmi.UnexpectedException: Failed to parse descriptor file; nested exception is:
java.security.AccessControlException: access denied (java.util.PropertyPermission weblogic.apache.xerces.maxentityrefs read)
at weblogic.rmi.internal.BasicOutboundRequest.marshalArgs(BasicOutboundRequest.java:85)
at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:257)
at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:230)
at weblogic.jms.frontend.FEConnectionFactory_WLStub.connectionCreate(Unknown Source)
at weblogic.jms.client.JMSConnectionFactory.createConnection(JMSConnectionFactory.java:122)
at weblogic.jms.client.JMSConnectionFactory.createTopicConnection(JMSConnectionFactory.java:80)
at cargoPoster(CargoMonitor.java:65)
...
Caused by: java.rmi.UnexpectedException: Failed to parse descriptor file; nested exception is:
java.security.AccessControlException: access denied (java.util.PropertyPermission weblogic.apache.xerces.maxentityrefs read)
at weblogic.rmi.internal.DescriptorManager.getBasicRuntimeDescriptor(DescriptorManager.java:70)
at weblogic.rmi.internal.DescriptorManager.getDescriptor(DescriptorManager.java:48)
at weblogic.rmi.internal.BasicServerRef.initializeDGCPolicy(BasicServerRef.java:164)
at weblogic.rmi.internal.BasicServerRef.<init>(BasicServerRef.java:141)
at weblogic.rmi.internal.OIDManager.initializeDGCServer(OIDManager.java:249)
at weblogic.rmi.internal.OIDManager.getReplacement(OIDManager.java:115)
at weblogic.common.internal.RemoteObjectReplacer.getReplacement(RemoteObjectReplacer.java:283)
at weblogic.common.internal.RemoteObjectReplacer.replaceObject(RemoteObjectReplacer.java:107)
at weblogic.common.internal.ChunkedObjectOutputStream.replaceObject(ChunkedObjectOutputStream.java:53)
at weblogic.common.internal.ChunkedObjectOutputStream$NestedObjectOutputStream.replaceObject(ChunkedObjectOutputStream.java:239)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1020)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)
at weblogic.common.internal.ChunkedObjectOutputStream.writeObject(ChunkedObjectOutputStream.java:107)
at weblogic.jms.dispatcher.DispatcherWrapper.writeExternal(DispatcherWrapper.java:123)
at weblogic.common.internal.ChunkedObjectOutputStream.writeObject(ChunkedObjectOutputStream.java:92)
at weblogic.rjvm.MsgAbbrevOutputStream.writeObject(MsgAbbrevOutputStream.java:82)
at weblogic.rmi.internal.ObjectIO.writeObject(ObjectIO.java:36)
at weblogic.rmi.internal.BasicOutboundRequest.marshalArgs(BasicOutboundRequest.java:81)
... 12 more
Caused by: java.security.AccessControlException: access denied (java.util.PropertyPermission weblogic.apache.xerces.maxentityrefs read)
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:270)
at java.security.AccessController.checkPermission(AccessController.java:401)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:542)
at java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1291)
at java.lang.System.getProperty(System.java:572)
at weblogic.apache.xerces.framework.XMLParser.<init>(XMLParser.java:239)
at weblogic.apache.xerces.framework.XMLParser.<init>(XMLParser.java:219)
at weblogic.apache.xerces.parsers.SAXParser.<init>(SAXParser.java:172)
at weblogic.apache.xerces.jaxp.SAXParserImpl.<init>(SAXParserImpl.java:110)
at weblogic.apache.xerces.jaxp.SAXParserFactoryImpl.newSAXParser(SAXParserFactoryImpl.java:103)
at weblogic.xml.jaxp.WebLogicSAXParser.<init>(WebLogicSAXParser.java:45)
at weblogic.xml.jaxp.WebLogicSAXParserFactory.newSAXParser(WebLogicSAXParserFactory.java:44)
at weblogic.rmi.internal.DescriptorManager.getDescriptorParser(DescriptorManager.java:83)
at weblogic.rmi.internal.DescriptorManager.getBasicRuntimeDescriptor(DescriptorManager.java:63)
... 29 more
I check out the docs and it seems to relate to the secure sandbox, but I can't figure out what is the trick I have missed. Does anyone have any comment on the problem?
Thanks for the help
Patrick
Chris Mathews
Ranch Hand

Joined: Jul 18, 2001
Posts: 2712
Did you also sign the weblogic.jar? When using Webstart and <all-permission/>, all of the jars used on the client must be signed.
[ March 31, 2003: Message edited by: Chris Mathews ]
Patrick Kwan
Greenhorn

Joined: Mar 31, 2003
Posts: 2
I have already sign all the jar files, and the JWS does not have problem about the signature.
Raseswari Achanta
Ranch Hand

Joined: Sep 25, 2001
Posts: 30
Applets doesn't support JMS API..
Refer to Features of JMS API under J2EE 1.3 in java.sun site to support my statement.
Regards
Raseswari.
Byron Estes
Ranch Hand

Joined: Feb 21, 2002
Posts: 313
For what it's worth...
You could have a servlet running that could accept requests from the applet. The servelet could then communicate via JMS to the MOM.


Byron Estes<br />Sun Certified Enterprise Architect<br />Senior Consulant<br />Blackwell Consulting Services<br />Chicago, IL<br /><a href="http://www.bcsinc.com" target="_blank" rel="nofollow">www.bcsinc.com</a>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem on Applet connecting to JMS