Stand-Alone JMS SAF Client

Im interested in using a WL Stand-Alone JMS SAF Client to send messages to a server-side JMS destination,
          regardless of the servers availability.
          This is for a J2SE Swing Application. There currently is no app server interaction.
          I found the doc http://e-docs.bea.com/wls/docs92/client/saf_client.html
          It describes almost everything except for what the actual client will look like.
          Im stuck after "Modify Your JMS Client Applications.." section.
          Questions:
          A) Suggestions for other docs?
          B) Is anyone using a Stand-Alone JMS SAF Client?
          C) Does anyone know of any code examples?
          The odd thing is that a search on the net for "JMS SAF Client" or variants of yields nothing other than the WL docs...
          Thanks!

I could not make stand-alone jms saf client work. Followed the doc, created ClientSAF.xml, made the change for intial-context factory. Tried using with provider_url and without it.
          I am not using default queue and connection factory. The client code is working fine when I don't use saf, i.e. "weblogic.jndi.WLInitialContextFactory" and provider_url.
          Getting following error:
          javax.naming.NoInitialContextException: Cannot instantiate class: weblogic.jndi.WLInitialContextFactory [Root exception is java.lang.ClassCastException: weblogic.security.service.SubjectManagerImpl]
               at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
               at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
               at javax.naming.InitialContext.init(Unknown Source)
               at javax.naming.InitialContext.<init>(Unknown Source)
               at weblogic.jms.safclient.agent.internal.ClientEnvironmentImpl.getContext(ClientEnvironmentImpl.java:76)
               at weblogic.jms.forwarder.Forwarder.getInitialContext(Forwarder.java:334)
               at weblogic.jms.forwarder.Forwarder.reconnect(Forwarder.java:210)
               at weblogic.jms.forwarder.Forwarder.timerExpired(Forwarder.java:265)
               at weblogic.timers.internal.TimerImpl.run(TimerImpl.java:259)
               at weblogic.work.ExecuteRequestAdapter.execute(ExecuteRequestAdapter.java:21)
               at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:145)
               at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:117)
          Caused by: java.lang.ClassCastException: weblogic.security.service.SubjectManagerImpl
               at weblogic.corba.client.ClientORBInitializer.initialize(ClientORBInitializer.java:106)
               at weblogic.jndi.WLInitialContextFactory.<init>(WLInitialContextFactory.java:29)
               at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
               at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
               at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
               at java.lang.reflect.Constructor.newInstance(Unknown Source)
               at java.lang.Class.newInstance0(Unknown Source)
               at java.lang.Class.newInstance(Unknown Source)
               ... 12 more
          java.lang.ClassCastException: weblogic.security.service.SubjectManagerImpl
               at weblogic.corba.client.ClientORBInitializer.initialize(ClientORBInitializer.java:106)
               at weblogic.jndi.WLInitialContextFactory.<init>(WLInitialContextFactory.java:29)
               at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)Stack level 1
               at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
               at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
               at java.lang.reflect.Constructor.newInstance(Unknown Source)
               at java.lang.Class.newInstance0(Unknown Source)
               at java.lang.Class.newInstance(Unknown Source)
               at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
               at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
               at javax.naming.InitialContext.init(Unknown Source)
               at javax.naming.InitialContext.<init>(Unknown Source)
               at weblogic.jms.safclient.agent.internal.ClientEnvironmentImpl.getContext(ClientEnvironmentImpl.java:76)
               at weblogic.jms.forwarder.Forwarder.getInitialContext(Forwarder.java:334)
               at weblogic.jms.forwarder.Forwarder.reconnect(Forwarder.java:210)
               at weblogic.jms.forwarder.Forwarder.timerExpired(Forwarder.java:265)
               at weblogic.timers.internal.TimerImpl.run(TimerImpl.java:259)
               at weblogic.work.ExecuteRequestAdapter.execute(ExecuteRequestAdapter.java:21)
               at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:145)
               at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:117)
          disconnect stack trace finished
          QUEUE NAME: jmssysmodule-ois!oisQueue

Similar Messages

  • JMS SAF client

    Hello ,
    Have a simple question about what jar files are required when using a safClient to connect to Weblogic.
    Some of the jar's are ,
    - weblogic.jar
    - wlclient.jar
    - wlfullclient.jar
    - wlsafclient.jar
    - wljmsclient.jar
    Are all of these jars required in the classpath on client side ?
    When we generate a wlfullclient.jar file using "java -jar wljarbuilder.jar" , Does this contain all the other jars ?
    In other words does wlfullclient.jar contain/include rest of the jar's ?
    Thanks,
    Stacy.

    Hi,
    In order to use JMS SAF client, you have the following options:
    1. using wlsafclient.jar and wljmsclient.jar/wlclient.jar together;
    2. using wlfullclient.jar, which contains wljmsclient.jar, wlclient.jar and wljmsclient.jar;
    3. using weblogic.jar, which contains everything.
    You'll get better performance if you use weblogic.jar.
    If you are using a recent release of WebLogic Server, say after 11gR1PS3, you have another option -- use wlthint3cleint and wlsaft3client.jar together. This will also give you better performance compared to option 1 and 2 above.
    -Dongbo

  • JMS SAF client paging directory definition ignored

    The paging directory definition in our ClientSAF.xml file is ignored:
              <weblogic-client-jms xmlns="http://www.bea.com/ns/weblogic/90" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
              <persistent-store>
                   <directory-path>C:\Work\newaupload\jms</directory-path>
                   <synchronous-write-policy>Disabled</synchronous-write-policy>
              </persistent-store>
              <saf-agent>
              <paging-directory>C:\Work\newaupload\jms-paging</paging-directory>
              </saf-agent>
              </weblogic-client-jms>
              Instead of the directory given in the configuration, the JMS SAF client creates a directory called "paging" in the current directory. In our case, the current directory is where all the binaries are and which is not writable, i.e. the JMS client fails.
              Is something wrong with the configuration? Or is this a bug?
              Peter
              Edited by peter05 at 05/30/2008 3:30 AM

    Hi Peter,
              For a server-side SAF with a file store, a paging directory would normally only be used internally for non-persistent messages - and I think client-side SAF would have the same behavior if it actually supports non-persistent messages in the first place.
              I don't know if the SAF client supports non-persistent - as I hadn't really thought about it -- there doesn't seem to be much purpose in it given that the purpose of SAF is store-and-forward and the "store" part implies persist messages.
              As a work-around, perhaps you can create the directory manually as read-only, then check to see if your app places any files in this directory. If it is, then your app could be creating non-persistent messages for store-and-forward, which likely isn't your intent -- non-persistent messages are not recovered on a restart, even if they are in a paging directory.
              If there must be an active paging directory for some reason, I advise (A) contacting customer support to find a way to configure it uniquely and (B), as a work-around, using an operating level linked directory or some-such to redirect the "paging" directory name out of your read-only binary directory to a better place.
              Hope this helps,
              Tom
              PS. In addition, it's a little strange to me that this directory name is hard-coded - what would happen if two SAF clients running in the same JVM attempted to use the same paging directory? Would they conflict with or even corrupt each-other?

  • JMS SAF client cannot forward messages - Caused by: javax.crypto.BadPadding

    Hi,
    I seem to be struggling with a problem that I'm not sure if I can ever find a solution.
    I have a configured a local JMS client to forward my messages to a remote WLSB 9.2.
    The local client is running JDK 1_0_14 on a windows platform.
    The remote server is on IBM JRE on linux. Now I'm getting problems when the messages are forwarded by the local SAF client. The client does not seem to be able to decrypt the password I have in my SAFClient.xml. I have pretty much followed every line in the documentation of SAF client and has already revisited it a few times.
    It seems to be something to do with the ClientSAFEncrypt utility that I was advised to get the encrypted password which I have put in the XML File. Here is the exception. Any help will be greatly appreciated.
    All I know is it is something to do with encoding of the password, but I cannot get a clue what else.
    <Mar 25, 2008 12:28:40 PM PDT> <Info> <Store> <BEA-280050> <Persistent store "SAFSTORE0V" opened: directory="C:\depot\javaSrc\logging\stores\default" writePolicy="Direct-Write" blockSize=512 directIO=false driver="NIO">
    javax.naming.NamingException: Invalid password key to unlock the passwords in the configuration file [Root exception is weblogic.jms.common.JMSException: Invalid password key to unlock the passwords in the configuration file]
         at weblogic.jms.safclient.jndi.InitialContextFactoryImpl.getNamingException(InitialContextFactoryImpl.java:31)
         at weblogic.jms.safclient.jndi.InitialContextFactoryImpl.getInitialContext(InitialContextFactoryImpl.java:162)
         at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
         at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
         at javax.naming.InitialContext.init(InitialContext.java:223)
         at javax.naming.InitialContext.<init>(InitialContext.java:197)
         at com.netflix.messaging.ESBFactory.<init>(ESBFactory.java:103)
         at com.netflix.messaging.ESBFactory.getFactory(ESBFactory.java:45)
         at com.netflix.messaging.NFMessagingManager.getProducerHandle(NFMessagingManager.java:218)
         at com.netflix.messaging.NFMessagingManager.initProducers(NFMessagingManager.java:730)
         at com.netflix.messaging.NFMessagingManager.init(NFMessagingManager.java:863)
         at com.netflix.messaging.NFMessagingManager.start(NFMessagingManager.java:1461)
         at com.netflix.messaging.NFMessagingManager.start(NFMessagingManager.java:1628)
         at com.netflix.logging.messaging.MessageDestinationDispatcher.startMessagingManager(MessageDestinationDispatcher.java:164)
         at com.netflix.logging.messaging.MessageDestinationDispatcher.<init>(MessageDestinationDispatcher.java:25)
         at com.netflix.logging.NFMessageAppender.append(NFMessageAppender.java:72)
         at org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:251)
         at org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:66)
         at org.apache.log4j.Category.callAppenders(Category.java:206)
         at org.apache.log4j.Category.forcedLog(Category.java:391)
         at org.apache.log4j.Category.log(Category.java:838)
         at com.netflix.logging.log4jAdapter.Log4jLoggingAdapter.log(Log4jLoggingAdapter.java:64)
         at com.netflix.logging.NFLogger.log(NFLogger.java:125)
         at com.netflix.logging.LogManager.info(LogManager.java:152)
         at com.netflix.logging.aggregator.Bucketer.init(Bucketer.java:92)
         at com.netflix.logging.aggregator.Bucketer.<init>(Bucketer.java:80)
         at com.netflix.logging.aggregator.TracerAggregator.<init>(TracerAggregator.java:29)
         at com.netflix.logging.aggregator.TracerAggregator.<clinit>(TracerAggregator.java:20)
         at com.netflix.logging.NFLogger.start(NFLogger.java:105)
         at com.netflix.logging.LogManager.registerLogger(LogManager.java:67)
         at com.netflix.logging.test.LoggingTest.sendDefault(LoggingTest.java:32)
         at com.netflix.logging.test.LoggingTest.main(LoggingTest.java:19)
    Caused by: weblogic.jms.common.JMSException: Invalid password key to unlock the passwords in the configuration file
         at weblogic.jms.safclient.admin.ConfigurationUtils.doRemoteContexts(ConfigurationUtils.java:475)
         at weblogic.jms.safclient.agent.AgentManager.<init>(AgentManager.java:54)
         at weblogic.jms.safclient.ClientSAFDelegate.open(ClientSAFDelegate.java:65)
         at weblogic.jms.safclient.ClientSAFImpl.open(ClientSAFImpl.java:62)
         at weblogic.jms.safclient.jndi.InitialContextFactoryImpl.getInitialContext(InitialContextFactoryImpl.java:160)
         ... 30 more
    Caused by: javax.crypto.BadPaddingException: Given final block not properly padded
         at com.sun.crypto.provider.SunJCE_h.b(DashoA12275)
         at com.sun.crypto.provider.SunJCE_h.b(DashoA12275)
         at com.sun.crypto.provider.SunJCE_af.b(DashoA12275)
         at com.sun.crypto.provider.PBEWithMD5AndDESCipher.engineDoFinal(DashoA12275)
         at javax.crypto.Cipher.doFinal(DashoA12275)
         at weblogic.jms.common.SecHelper.decryptString(SecHelper.java:140)
         at weblogic.jms.safclient.admin.ConfigurationUtils.doRemoteContexts(ConfigurationUtils.java:473)
         ... 34 more
    java.lang.IllegalStateException: Cannot create context: Invalid password key to unlock the passwords in the configuration file
         at com.netflix.messaging.ESBFactory.<init>(ESBFactory.java:106)
         at com.netflix.messaging.ESBFactory.getFactory(ESBFactory.java:45)
         at com.netflix.messaging.NFMessagingManager.getProducerHandle(NFMessagingManager.java:218)
         at com.netflix.messaging.NFMessagingManager.initProducers(NFMessagingManager.java:730)
         at com.netflix.messaging.NFMessagingManager.init(NFMessagingManager.java:863)
         at com.netflix.messaging.NFMessagingManager.start(NFMessagingManager.java:1461)
         at com.netflix.messaging.NFMessagingManager.start(NFMessagingManager.java:1628)
         at com.netflix.logging.messaging.MessageDestinationDispatcher.startMessagingManager(MessageDestinationDispatcher.java:164)
         at com.netflix.logging.messaging.MessageDestinationDispatcher.<init>(MessageDestinationDispatcher.java:25)
         at com.netflix.logging.NFMessageAppender.append(NFMessageAppender.java:72)
         at org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:251)
         at org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:66)
         at org.apache.log4j.Category.callAppenders(Category.java:206)
         at org.apache.log4j.Category.forcedLog(Category.java:391)
         at org.apache.log4j.Category.log(Category.java:838)
         at com.netflix.logging.log4jAdapter.Log4jLoggingAdapter.log(Log4jLoggingAdapter.java:64)
         at com.netflix.logging.NFLogger.log(NFLogger.java:125)
         at com.netflix.logging.LogManager.info(LogManager.java:152)
         at com.netflix.logging.aggregator.Bucketer.init(Bucketer.java:92)
         at com.netflix.logging.aggregator.Bucketer.<init>(Bucketer.java:80)
         at com.netflix.logging.aggregator.TracerAggregator.<init>(TracerAggregator.java:29)
         at com.netflix.logging.aggregator.TracerAggregator.<clinit>(TracerAggregator.java:20)
         at com.netflix.logging.NFLogger.start(NFLogger.java:105)
         at com.netflix.logging.LogManager.registerLogger(LogManager.java:67)
         at com.netflix.logging.test.LoggingTest.sendDefault(LoggingTest.java:32)

    Hi,
    I seem to be struggling with a problem that I'm not sure if I can ever find a solution.
    I have a configured a local JMS client to forward my messages to a remote WLSB 9.2.
    The local client is running JDK 1_0_14 on a windows platform.
    The remote server is on IBM JRE on linux. Now I'm getting problems when the messages are forwarded by the local SAF client. The client does not seem to be able to decrypt the password I have in my SAFClient.xml. I have pretty much followed every line in the documentation of SAF client and has already revisited it a few times.
    It seems to be something to do with the ClientSAFEncrypt utility that I was advised to get the encrypted password which I have put in the XML File. Here is the exception. Any help will be greatly appreciated.
    All I know is it is something to do with encoding of the password, but I cannot get a clue what else.
    <Mar 25, 2008 12:28:40 PM PDT> <Info> <Store> <BEA-280050> <Persistent store "SAFSTORE0V" opened: directory="C:\depot\javaSrc\logging\stores\default" writePolicy="Direct-Write" blockSize=512 directIO=false driver="NIO">
    javax.naming.NamingException: Invalid password key to unlock the passwords in the configuration file [Root exception is weblogic.jms.common.JMSException: Invalid password key to unlock the passwords in the configuration file]
         at weblogic.jms.safclient.jndi.InitialContextFactoryImpl.getNamingException(InitialContextFactoryImpl.java:31)
         at weblogic.jms.safclient.jndi.InitialContextFactoryImpl.getInitialContext(InitialContextFactoryImpl.java:162)
         at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
         at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
         at javax.naming.InitialContext.init(InitialContext.java:223)
         at javax.naming.InitialContext.<init>(InitialContext.java:197)
         at com.netflix.messaging.ESBFactory.<init>(ESBFactory.java:103)
         at com.netflix.messaging.ESBFactory.getFactory(ESBFactory.java:45)
         at com.netflix.messaging.NFMessagingManager.getProducerHandle(NFMessagingManager.java:218)
         at com.netflix.messaging.NFMessagingManager.initProducers(NFMessagingManager.java:730)
         at com.netflix.messaging.NFMessagingManager.init(NFMessagingManager.java:863)
         at com.netflix.messaging.NFMessagingManager.start(NFMessagingManager.java:1461)
         at com.netflix.messaging.NFMessagingManager.start(NFMessagingManager.java:1628)
         at com.netflix.logging.messaging.MessageDestinationDispatcher.startMessagingManager(MessageDestinationDispatcher.java:164)
         at com.netflix.logging.messaging.MessageDestinationDispatcher.<init>(MessageDestinationDispatcher.java:25)
         at com.netflix.logging.NFMessageAppender.append(NFMessageAppender.java:72)
         at org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:251)
         at org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:66)
         at org.apache.log4j.Category.callAppenders(Category.java:206)
         at org.apache.log4j.Category.forcedLog(Category.java:391)
         at org.apache.log4j.Category.log(Category.java:838)
         at com.netflix.logging.log4jAdapter.Log4jLoggingAdapter.log(Log4jLoggingAdapter.java:64)
         at com.netflix.logging.NFLogger.log(NFLogger.java:125)
         at com.netflix.logging.LogManager.info(LogManager.java:152)
         at com.netflix.logging.aggregator.Bucketer.init(Bucketer.java:92)
         at com.netflix.logging.aggregator.Bucketer.<init>(Bucketer.java:80)
         at com.netflix.logging.aggregator.TracerAggregator.<init>(TracerAggregator.java:29)
         at com.netflix.logging.aggregator.TracerAggregator.<clinit>(TracerAggregator.java:20)
         at com.netflix.logging.NFLogger.start(NFLogger.java:105)
         at com.netflix.logging.LogManager.registerLogger(LogManager.java:67)
         at com.netflix.logging.test.LoggingTest.sendDefault(LoggingTest.java:32)
         at com.netflix.logging.test.LoggingTest.main(LoggingTest.java:19)
    Caused by: weblogic.jms.common.JMSException: Invalid password key to unlock the passwords in the configuration file
         at weblogic.jms.safclient.admin.ConfigurationUtils.doRemoteContexts(ConfigurationUtils.java:475)
         at weblogic.jms.safclient.agent.AgentManager.<init>(AgentManager.java:54)
         at weblogic.jms.safclient.ClientSAFDelegate.open(ClientSAFDelegate.java:65)
         at weblogic.jms.safclient.ClientSAFImpl.open(ClientSAFImpl.java:62)
         at weblogic.jms.safclient.jndi.InitialContextFactoryImpl.getInitialContext(InitialContextFactoryImpl.java:160)
         ... 30 more
    Caused by: javax.crypto.BadPaddingException: Given final block not properly padded
         at com.sun.crypto.provider.SunJCE_h.b(DashoA12275)
         at com.sun.crypto.provider.SunJCE_h.b(DashoA12275)
         at com.sun.crypto.provider.SunJCE_af.b(DashoA12275)
         at com.sun.crypto.provider.PBEWithMD5AndDESCipher.engineDoFinal(DashoA12275)
         at javax.crypto.Cipher.doFinal(DashoA12275)
         at weblogic.jms.common.SecHelper.decryptString(SecHelper.java:140)
         at weblogic.jms.safclient.admin.ConfigurationUtils.doRemoteContexts(ConfigurationUtils.java:473)
         ... 34 more
    java.lang.IllegalStateException: Cannot create context: Invalid password key to unlock the passwords in the configuration file
         at com.netflix.messaging.ESBFactory.<init>(ESBFactory.java:106)
         at com.netflix.messaging.ESBFactory.getFactory(ESBFactory.java:45)
         at com.netflix.messaging.NFMessagingManager.getProducerHandle(NFMessagingManager.java:218)
         at com.netflix.messaging.NFMessagingManager.initProducers(NFMessagingManager.java:730)
         at com.netflix.messaging.NFMessagingManager.init(NFMessagingManager.java:863)
         at com.netflix.messaging.NFMessagingManager.start(NFMessagingManager.java:1461)
         at com.netflix.messaging.NFMessagingManager.start(NFMessagingManager.java:1628)
         at com.netflix.logging.messaging.MessageDestinationDispatcher.startMessagingManager(MessageDestinationDispatcher.java:164)
         at com.netflix.logging.messaging.MessageDestinationDispatcher.<init>(MessageDestinationDispatcher.java:25)
         at com.netflix.logging.NFMessageAppender.append(NFMessageAppender.java:72)
         at org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:251)
         at org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:66)
         at org.apache.log4j.Category.callAppenders(Category.java:206)
         at org.apache.log4j.Category.forcedLog(Category.java:391)
         at org.apache.log4j.Category.log(Category.java:838)
         at com.netflix.logging.log4jAdapter.Log4jLoggingAdapter.log(Log4jLoggingAdapter.java:64)
         at com.netflix.logging.NFLogger.log(NFLogger.java:125)
         at com.netflix.logging.LogManager.info(LogManager.java:152)
         at com.netflix.logging.aggregator.Bucketer.init(Bucketer.java:92)
         at com.netflix.logging.aggregator.Bucketer.<init>(Bucketer.java:80)
         at com.netflix.logging.aggregator.TracerAggregator.<init>(TracerAggregator.java:29)
         at com.netflix.logging.aggregator.TracerAggregator.<clinit>(TracerAggregator.java:20)
         at com.netflix.logging.NFLogger.start(NFLogger.java:105)
         at com.netflix.logging.LogManager.registerLogger(LogManager.java:67)
         at com.netflix.logging.test.LoggingTest.sendDefault(LoggingTest.java:32)

  • NameNotFoundException in JNDI lookup in for stand alone App client in EJB3

    I created an ejb module in netbeans 5.5 added a session facade (SavingsaccountFacade) and downloaded it to SunAppServer 9 (java EE 5). When I try and access the JNDI name in a stand alone java application client using the following code
    Context initial = new InitialContext();
    Object objref = initial.lookup("ejb/SavingsaccountFacade");
    I get the following errors:
    javax.naming.NameNotFoundException: SavingsaccountFacade not found
    at com.sun.enterprise.naming.TransientContext.doLookup(TransientContext.java:203)
    I have added j2ee.jar, appserv-rt.jar, and the dist/SavingsAccount.jar to the library. When I do a similar thing in J2EE1.4 it worked fine.
    Can somebody help please.
    Thanks

    Hi Dave,
    Here's our EJB FAQ entry that explains how EJB Global JNDI names are set in the
    Java EE 5 SDK and Glassfish. The most likely explanation is that the name used
    in the client does not match the one assigned to your EJB in sun-ejb-jar.xml.
    https://glassfish.dev.java.net/javaee5/ejb/EJB_FAQ.html#SessionBeanGlobalJNDINameAssignment
    --ken                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Accessing JMS Queue located in stand alone managed server on same domain

    Our use-case is as follows.
    In our weblogic domain we have SOA_Cluster and a stand alone managed server. All the custom JMS resources belong to a JMS server that is targeted to stand alone JMS server. We are trying to access JMS Queues/Topics located in the stand alone managed server from JMS adapter (part of SOA Cluster).
    I am wondering what should be our adapter configuration in this scenario. In going through JMS adapter use-cases (below is the link), there is a mention of how to access resources located in Remote weblogic Domain. I am wondering if the same applies to us OR if there is better way to access JMS resources for our use case.
    http://download.oracle.com/docs/cd/E14571_01/integration.1111/e10231/adptr_jms.htm#CJAHAFGF
    Appreciate your feedback.

    Accessing JMS Queue/Topic located in different Managed server on same domai
    Regards,
    Anuj

  • Stand-Alone Client to Access JMS Resource without ACC

    I'am having trouble to run the JMS SimpleProducer example from the JMS tutorial as a Stand-Alone application.
    Although its works as suggested when run inside an ACC. (The tutorial I refer to: http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JMS5.html#wp79822 )
    The JMS provider I use is Sun Java System Application Server Platform Edition 8.2 (build b06-fcs).
    Its documentation states that one could run a client outside the ACC and still access JMS:
    http://docs.sun.com/source/819-0217-10/dgacc.html#wp1022252
    Following those instructions throws an exeption when invoking
    Context jndiContext = new InitialContext();
    jndiContext.lookup("jms/ConnectionFactory");Of course I did add the three required libraries (appserv-rt.jar, j2ee.jar, imqjmsra.jar) and added the VM arguments to point the client's orb to the JSAS. Also, the JMS administed object exist, admin console shows them and example in ACC worked fine.
    The last step of the tutorial says: "� As long as the client environment is set appropriately and the JVM is compatible, you merely need to run the main class." Is there anything I miss? Btw. I run the example on Mac OS X 10.4.6 and Java 1.5.0_06.
    Why does the exception refer to org/netbeans/modules/schema2beans/BaseBeanThat is the exception thrown:
    Destination name is jms/Queue
    04.04.2006 16:25:12 com.sun.corba.ee.spi.logging.LogWrapperBase doLog
    INFO: "IOP00710299: (INTERNAL) Successfully created IIOP listener on the specified host/port: all interfaces/49648"
    Exception in thread "main" java.lang.NoClassDefFoundError: org/netbeans/modules/schema2beans/BaseBean
            at java.lang.ClassLoader.defineClass1(Native Method)
            at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
            at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
            at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
            at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
            at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
            at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
            at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
            at com.sun.enterprise.connectors.ConnectorAdminServicesFactory.getService(ConnectorAdminServicesFactory.java:35)
            at com.sun.enterprise.connectors.ConnectorRuntime.createServices(ConnectorRuntime.java:109)
            at com.sun.enterprise.connectors.ConnectorRuntime.getRuntime(ConnectorRuntime.java:71)
            at com.sun.enterprise.naming.factory.ConnectorObjectFactory.getObjectInstance(ConnectorObjectFactory.java:55)
            at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
            at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:293)
            at javax.naming.InitialContext.lookup(InitialContext.java:351)
            at SimpleProducer.main(SimpleProducer.java:66)
    Java Result: 1

    Adding a fourth jar from the JSAS to the standalone application resolves the problem: appserv-admin.jar - available at install_dir/lib/appserv-admin.jar
    Does the tutorial miss this or is there anything I missunderstood?

  • Stand alone client for remote EJB corba error

    Regarding problem below, I've checked System env variables
    that weblogic server is using for CORBA classes:
    javax.rmi.CORBA.UtilClass=weblogic.iiop.UtilDelegateImpl
    org.omg.CORBA.ORBSingletonClass=weblogic.corba.orb.ORB
    org.omg.CORBA.ORBClass weblogic.corba.orb.ORB
    javax.rmi.CORBA.PortableRemoteObjectClass=weblogic.iiop.PortableRemoteObjectDelegateImpl
    But these are server classes and not found in wlclient.jar and wljmsclient.jar. What classes should be used for client? What needs to be set in order to get successful remote RMI/EJB call to weblogic server?
    Original post:
    I have a stand alone spring client for simple stateless session EJB deployed on weblogic 9.2. I'm using spring (jdk 1.5) to call this remote EJB and the only way I can succeed is to have full weblogic.jar in my bootstrap classpath. Otherwise I get corba error:
    CORBA BAD_PARAM 0 No; nested exception is:
    org.omg.CORBA.BAD_PARAM: vmcid: 0x0 minor code: 0 completed: No
    Interestingly, within same client I have JMS call to weblogic JMS and that fails if weblogic.jar is in boot classpath. Getting rid of weblogic.jar from boot classpath works if I have wlclient.jar and wljmsclient.jar in regular classpath (as per weblogic docs). I would think that for stand alone client all I would need is to weblogic client jars, why should I need to have full weblogic.jar?
    I can't get those work together with same classpath. I wonder if anybody has some pointers and/or advice. I was looking to set system parameters for corba for weblogic client that maybe could help:
    org.omg.CORBA.ORBClass
    org.omg.CORBA.ORBSingletonClass
    javax.rmi.CORBA.UtilClass
    javax.rmi.CORBA.StubClass
    javax.rmi.CORBA.PortableRemoteObjectClass
    But I can't find definitive answer.
    Regards,
    -pp
    Edited by mr.papini at 06/28/2007 9:05 AM

    I'm stuck exactly with the same issue while trying to port my application from weblogic to jboss.
    I tried to specify different ORB implementations (JacORB, OpenORB) for jvm option org.omg.CORBA.ORBClass, but JBoss couldn't get them instantiated. Native Sun implementation which is used in JBoss by default and can be instantiated, apparently is not fully compatible with weblogic security module.
    So did you manage to find out the solution?
    Edited by DigitalDude at 04/09/2008 11:47 PM

  • Consuming dataservice as a stand alone java client, givng an exception com

    when i am trying to access data service from a stand alone java application ,it giving an exception .
    The dataservice is in remote machine.
    Exception:
    com.bea.dsp.dsmediator.client.exception.SDOMediatorException: weblogic.rjvm.PeerGoneException: ; nested exception is:
         java.io.EOFException
         at com.bea.dsp.dsmediator.client.XmlDataServiceBase.invokeFunction(XmlDataServiceBase.java:322)
         at empldetappdataservices.EmployeeDetails.getEmployeesByid(EmployeeDetails.java:84)
         at com.patni.tsg.poc.DataServiceClient.DataServiceClient.main(DataServiceClient.java:42)
    Caused by: weblogic.rjvm.PeerGoneException: ; nested exception is:
         java.io.EOFException
         at weblogic.rjvm.BasicOutboundRequest.sendReceive(BasicOutboundRequest.java:108)
         at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:290)
         at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:248)
         at com.bea.ld.Server_ydm4ie_EOImpl_815_WLStub.executeFunction(Unknown Source)
         at com.bea.dsp.dsmediator.client.XmlDataServiceBase.invokeFunction(XmlDataServiceBase.java:312)
         ... 2 more
    Caused by: java.io.EOFException
         at weblogic.rjvm.t3.T3JVMConnection.endOfStream(T3JVMConnection.java:897)
         at weblogic.socket.SocketMuxer.deliverExceptionAndCleanup(SocketMuxer.java:586)
         at weblogic.socket.SocketMuxer.deliverEndOfStream(SocketMuxer.java:536)
         at weblogic.socket.SocketMuxer.readReadySocketOnce(SocketMuxer.java:694)
         at weblogic.socket.SocketMuxer.readReadySocket(SocketMuxer.java:641)
         at weblogic.socket.JavaSocketMuxer.processSockets(JavaSocketMuxer.java:282)
         at weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:32)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)
    my class path i added all neccessary jars:
    weblogic.jar,xbean.jar,DataServices.jar,ld-server-core.jar,ld-client.jar,wlsdo.jar
    code sample:
    public static InitialContext getInitialContext() throws NamingException {
    Environment env = new Environment();
    env.setProviderUrl("t3://pc-p40892:7001");
    env.setInitialContextFactory("weblogic.jndi.WLInitialContextFactory");
    env.setSecurityPrincipal("weblogic");
    env.setSecurityCredentials("weblogic");
    return new InitialContext(env.getInitialContext().getEnvironment());
    public static void main (String args[]) {
    try {
    EmployeeDetailsDocument.EmployeeDetails edet=null;
    EmployeeDetails ds=EmployeeDetails.getInstance(getInitialContext(),"EmplDetApp");
    //The below statement generating the exception.
    EmployeeDetailsDocument[]doc =ds.getEmployeesByid("1001");
    } catch (Exception e) {
    e.printStackTrace();
    pls help me to solve this problem
    Edited by sandeepc221 at 09/19/2007 2:50 AM

    You didn't post the stack trace from the server, but I'm guessing it's complaining about the QName class. Sun changed the QName class in JDK 1.5 wreaking havoc on JDK 1.5 clients that use JDK 1.4 servers and attempt to pass a QName object from one to the other. If your client uses JDK 1.5, your sever will need to use a QName class which is compatible. The file liquiddata/lib/wls90interop.jar contains a QName class that is compatible with the one in JDK1.5. You can put it first in the classpath of your server.
    If you already have wls90interop.jar first in the classpath of your server, then, for your client, you need to either (1) use the Sun JDK 1.5; or (2) put wls90interop.jar first in the classpath of your client (if you are running JDK 1.4).
    http://e-docs.bea.com/aldsp/docs25/appdev/ejbclt.html#wp1090900
    btw - BEA Customer Support is available 24/7 - they should be able to provide you quick answers to questions like this.

  • Problems in accessing EJB from stand-alone client

    Hi,
    I am trying to access a EJB deployed in RI from a stand-alone client. When I run it, I got this exception:
    Exception in thread "main" java.rmi.AccessException: CORBA NO_PERMISSION 9998 Ma
    ybe; nested exception is:
    org.omg.CORBA.NO_PERMISSION: minor code: 9998 completed: Maybe
    org.omg.CORBA.NO_PERMISSION: minor code: 9998 completed: Maybe
    at java.lang.Class.newInstance0(Native Method)
    at java.lang.Class.newInstance(Unknown Source)
    at com.sun.corba.ee.internal.iiop.messages.ReplyMessage_1_2.getSystemExc
    eption(ReplyMessage_1_2.java:93)
    at com.sun.corba.ee.internal.iiop.ClientResponseImpl.getSystemException(
    ClientResponseImpl.java:108)
    at com.sun.corba.ee.internal.POA.GenericPOAClientSC.invoke(GenericPOACli
    entSC.java:136)
    at org.omg.CORBA.portable.ObjectImpl._invoke(Unknown Source)
    at TheBeanRemoteStub.test(Unknown Source)
    at Client.main(Client.java:19)
    The following is the code of the client:
    System.setProperty(Context.SECURITY_PRINCIPAL, "achong");
    System.setProperty(Context.SECURITY_CREDENTIALS, "achong");
    Context context = new InitialContext(System.getProperties());
    Object object = PortableRemoteObject.narrow(context.lookup("MyBean"), TheBeanHome.class);
    TheBeanHome home = (TheBeanHome) object;
    I have set "support client choice" while deploying the bean, and set which roles can access which methods. Any idea? Is my code is incorrect?

    I have the same problem like you.
    If you solve it, please give me a hint.
    Thank you very much!
    [email protected]

  • Stand-alone client - lookup problem

    I have a stand-alone Java client application (ContactClient) that I want to use to access an EJB called Contact. I am using J2EE, deploying with deploytool. The EJB has a JNDI name of "MyContact", and the Client reference is "ejb/TheContact". The relevant code in the app is:
    try
    java.util.Properties props = new java.util.Properties();
    props.put(Context.INITIAL_CONTEXT_FACTORY,
    "com.sun.jndi.cosnaming.CNCtxFactory");
    props.put(Context.PROVIDER_URL, "iiop://localhost:1050");
    Context initial = new InitialContext(props);
    Object objref = initial.lookup("ejb/TheContact");
    ContactHome home =
    (ContactHome)PortableRemoteObject.narrow(objref,
    ContactHome.class);
    contact = home.create();
    catch (Exception ex)
    System.err.println("Exception: " + ex.getMessage());
    ex.printStackTrace();
    The following exception is thrown by initial.lookup("ejb/TheContact");
    javax.naming.NameNotFoundException. Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0
    I have tried changing the name to "TheContact", and to "java:comp/env/TheContact" with no success. If I change it to the JNDI name "MyContact", the lookup works, but the following call, PortableRemoteObject.narrow(), throws a java.lang.ClassCastException.
    What am I doing wrong?
    John

    Hi, Thanks for your fast reply, but it still doesn't work.
    With your Code I get a classCastException in this line:
    "SessionHome home = (SessionHome)ctx.lookup("SessionBeanInstance");"
    Here is the code from the whole thing, as it works with the appclient script:
    SessionHome: //RemoteHomeInterface
    package ejb;
    import java.rmi.RemoteException;
    import javax.ejb.CreateException;
    import javax.ejb.EJBHome;
    public interface SessionHome extends EJBHome {
    Session create() throws RemoteException, CreateException;
    Session //Session RemoteInterface
    package ejb;
    import javax.ejb.EJBObject;
    import java.rmi.RemoteException;
    public interface Session extends EJBObject {
    public String getString() throws RemoteException;
    SessionBeanInstance //The SessionBean
    package ejb;
    import javax.ejb.SessionBean;
    import javax.ejb.CreateException;
    import javax.ejb.SessionContext;
    public class SessionBeanInstance implements SessionBean{
    public SessionContext context;
    public String getString(){ return "works"; }
    public SessionBeanInstance() {  }
    public void ejbCreate() throws CreateException { System.out.println("Bean created"); }
    public void ejbActivate() {  }
    public void ejbPassivate() {  }
    public void ejbRemove() {  }
    public void setSessionContext(SessionContext ctx) {  context = ctx;  }
    clientMain //The client class
    package client;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
    import javax.naming.NamingEnumeration;
    import javax.rmi.PortableRemoteObject;
    import ejb.*;
    import java.util.Hashtable;
    public class clientMain {
    private SessionHome home;
    private Session mySession;
    private Context ctx;
    private Object objref;
    public clientMain() {
    try{
    Hashtable env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.cosnaming.CNCtxFactory");
    env.put(Context.PROVIDER_URL, "iiop://127.0.0.1:3700");
    try{
    Context ctx = new InitialContext(env);
    SessionHome home = (SessionHome)ctx.lookup("SessionBeanInstance");
    Session remote = (Session)home.create();
    String test = remote.getString();
    System.out.println(test);
    catch(Exception e){ e.printStackTrace(); }
    catch (Exception ex) { 
    System.err.println("Caught an exception.");
    ex.printStackTrace();
    The error occurs only if is start with the "java -jar" script. Here is the error:
    lang.ClassCastException: com.sun.corba.se.impl.corba.CORBAObjectImpl
    at client.clientMain.<init>(clientMain.java:27)
    at client.Client.main(Client.java:10)
    I don't know what to do, to get it work...

  • How to access my application on a SunOne 8.0.0_01 from a stand-alone client

    Hello,
    perhaps someone of you knows how can solve my problem accessing my J2EE-Application with EJBs, etc. from a stand-alone client.
    In the classpath of my client the appserv-rt.jar and j2ee.jar are accessible. In the sourcecode I tried to access the server with:
    Properties env = new Properties();
    env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.cosnaming.CNCtxFactory");       
    env.put(Context.PROVIDER_URL, "iiop://myserver:3700");
    Context initialContext = new InitialContext(env);
    Object objRef = initialContext.lookup("MySessionBean");With these setting I get this exception:
    java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
         java.rmi.RemoteException
         at com.sun.corba.se.internal.iiop.ShutdownUtilDelegate.mapSystemException(ShutdownUtilDelegate.java:64)
         at javax.rmi.CORBA.Util.mapSystemException(Util.java:65)
         at de.fhhn.ectsmodulclient.interfaces._ECTSModulSession_Stub.getStudiengaenge(Unknown Source)
         at de.hshn.ectsmodulclient.web.StandAloneClient.showStudiengaenge(StandAloneClient.java:68)
         at de.hshn.ectsmodulclient.web.StandAloneClient.main(StandAloneClient.java:90)
    Caused by: java.rmi.RemoteException
         at com.sun.enterprise.iiop.POAProtocolMgr.mapException(POAProtocolMgr.java:213)
         at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:797)
         at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:137)
         at $Proxy36.getStudiengaenge(Unknown Source)Can anybody tell me what the problem is and probably how I can make it work?
    Are there some "hidden" configuration-parameters on the serverside that I have to set/change?
    Thank you for your help!
    Greetings
    Gregor Ewald

    Did your stand-alone client on the remote machine encounter the same error as your tomcat attempt? Try looking in the tomcat log for a more detailed stack trace.
    I'm able to do this from tomcat 5.0 on a remote machine with JDK 1.5 and the latest version of the J2EE 1.4 SDK release (AS 8.2) for an appserver running on linux or solaris. You might want to try with those versions as well.
    --ken                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Security exception while trying to access EJB from stand alone client

    Hi!, I am trying a sample EJB application to R&D some security related issues. I want to access EJB through a web application as well as a stand-alone client. I have set approriate <method-permission> in EJB deployment descriptor. I am using users.properties/roles.properties file for authentication mechanism. I am using JBoss 3.2.
    - On the web application side I am using BASIC authentication and the servlet is able to access the EJB OK, as long as I am using a login/password that has access to the EJB.
    - Now I am trying to access the EJB using a stand alone Java class. These are the things I have tried till now:
    =>Created a InitialContext with appropriate principal, credentials and tried getting a reference to EJB home interface. That resulted in security exception.
    =>Logged into a LoginContext by using appropriate JBossSX classes and then tried getting a EJB home interface. Again security exception.
    Now I am not sure what to do. I read at some places about client side container but not sure what that is. Does anyone has any ideas to try? Is there any other way I can make a swing application and a web application authenticate to EJB container?
    Also can anyone point me to any documentation that gives some idea about how the security credentials gets propagated from web application/standalone client to EJB container?

    It would be better if you can post your code...and DD that way we can help you better

  • Video for a stand-alone 'ebook' web page

    As an 'A' Level ICT student I have been asked to create an 'ebook' in dreamweaver. This book has to be a stand-alone product that does not rely on server technology or external links to websites. The specification for this work requires that I use video clips, is t5his possible given the limitations of the 'ebook' format?
    Thanks

    My current is:
    env.setProperty(Context.PROVIDER_URL, "iiop://localhost:2809");
    env.setProperty(Context.INITIAL_CONTEXT_FACTORY, "com.ibm.websphere.naming.WsnInitialContextFactory");
    InitialContext initCtx = new InitialContext(env);
    System.out.println("Getting connection factory....");
    // Finding the WAS QueueConnectionFactory
    javax.jms.ConnectionFactory qcf = (javax.jms.ConnectionFactory) initCtx.lookup(JMSCF_JNDI_NAME);
    System.out.println("qcf="+qcf);
    // Finding the Queue Destination
    Destination q = (Destination) initCtx.lookup(JMSQ_JNDI_NAME);
    I am getting exception as:
    Oct 26, 2005 4:10:11 PM com.ibm.ws.naming.java.javaURLContextFactory
    SEVERE: javaAccessorNotSet
    javax.naming.ConfigurationException: Name space accessor for the java: name space has not been set. Possible cause is that the user is specifying a java: URL name in a JNDI Context method call but is not running in a J2EE client or server environment.
    at com.ibm.ws.naming.java.javaURLContextFactory.isNameSpaceAccessable(javaURLContextFactory.java:98)
    at com.ibm.ws.naming.urlbase.UrlContextFactory.getObjectInstance(UrlContextFactory.java:73)
    at javax.naming.spi.NamingManager.getURLObject(NamingManager.java:579)
    at javax.naming.spi.NamingManager.getURLContext(NamingManager.java:528)
    at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:275)
    at javax.naming.InitialContext.lookup(InitialContext.java:347)
    at sender.Main.main(Main.java:29)

  • Migrating stand alone programs to web based application

    Hi,
    I have a small application consisting of .class files. I created these using Swing components and it's based on Client/ server model where it accesses Oracle Database.
    I want to deploy these programs in Java App Server so that it can be accessed thru web browser.
    Please tell me how to do it.
    Thanks in advance.
    Rajeev.
    Message was edited by:
    Rajeev.Asthana

    If this was the thing, Sun, Microsoft and IBM
    wouldn't have even giving a thought of migrating
    legacy application (I'm talking about Mainframes and
    AS/400 here). If this kind of migration is possible,
    can't we migrate a java code from stand-alone
    "version" to web enabled.
    Migration is not really a term to use to for converting a stand alone application to a web application. Unless of course again you are prepared to turn it into an applet.
    The flow and control of a web application are entirely different from a stand alone app. You will not be able to reuse Swing GUI's from a web server. I don't know how to make that any clearer.
    Hopefully you have a good design for your existing application and you can relatively easily reuse your existing business logic components.

Maybe you are looking for