App client can't instantiate the initial context factory
hi
i wrote an application client and a stateless session bean that i deployed with the deploytool from sun to the j2ee application server. now when i start my application client i get the following message:
NoInitialContextException: Cannot instantiate class: COM.sun.enterprise.naming.SerialInitContextFactory. Root exception is java.lang.ClassNotFoundException: COM.sun.enterprise.naming.SerialInitContextFactory
at java.net.URLClassLoader$1.run
my jndi.properties looks like this:
java.naming.factory.initial=COM.sun.enterprise.naming.SerialInitContextFactory
java.naming.factory.url.pkgs=COM.sun.enterprise.naming
and my server runs on the same computer as the client. the classpath variable is set to the j2ee.jar file ( and this file contains the selected initial factory ). i could not understand why i get this errormessage. has anyone a idea?
thanks to all
now i got it working. i'm using the orion application server and to get access from a remote computer ( outside the application server ) i have to set the environment properties in the following way:
Properties prop = new Properties();
prop.put(Context.INITIAL_CONTEXT_FACTORY,"com.evermind.server.rmi.RMIInitialContextFactory");
prop.put(Context.PROVIDER_URL,"ormi://localhost/TestBean02");
prop.put(Context.SECURITY_PRINCIPAL,"admin");
prop.put(Context.SECURITY_CREDENTIALS,"123");
InitialContext initial = new InitialContext(prop);
Object objref = initial.lookup("MyBeanel");
home = (TestBeanHome)PortableRemoteObject.narrow(objref, TestBeanHome.class);
this works, the client needs only the j2ee.jar and the orion.jar in the classpath.
Similar Messages
-
Hi
I am trying to develop a EJB Project and trying to call the EAR depployed on the server using JNDI.
I am writing the code using Java Client
Can i have the name of Initial Context Factory for WAS 6.40.
Its Urgent
With Wishes
Krishna KanthHi,
the Initial context factory on Web AS 6.40 is
com.sap.engine.services.jndi.InitialContextFactoryImpl -
My mum set up an iCloud account for my iPhone 4 but forgot the password. This caused me to create a new account, and it can be used for the App Store and iTunes and all that, but I can't change the initial iCloud account (the one my mum made). My device keeps prompting me for the password every few minutes after updating to iOS 8, and I've tried every option possible to retrieve the password, but I don't even know the answers to the security questions and I can't find the password reset email anywhere and I don't know the back up emails my mum used. I literally cannot find any legitimate way to sign out of the initial iCloud account without entering a password (which neither I nor my parents know). Is there a way for me to retreive the password or change to my new account without the password?
See:Creating an iCloud account: Frequently Asked Questions and How do I mange iCloud account about 3/4s of the way down.
-
Reusing the Initial Context Object
Hi all
Environment: Weblogic 452
JNDI implementation of Weblogic 452 is based on Javasoft JNDI 1.1 and
SPI specifications.(refer: Developer docs for 452).Javadoc of
InitialContext for JNDI 1.1 says (refer -
http://java.sun.com/products/jndi/javadoc/index.html)
An InitialContext instance is not synchronized against concurrent access
by multiple threads. Multiple threads each manipulating their own
InitialContext
instances need not synchronize. Threads that need to access a single
InitialContext instance concurrently should synchronize amongst
themselves
and provide the necessary locking
1. Does reusing the InitialContext object accross threads for lookup and
then execution of remote methods cause any problems? or should we
synchronize access?
How weblogic 452 handles this.
2. Let say i do this
a. get InitialContext
b. do lookup
c. get remote reference
d. close context
e. execute methods on the remote reference got in step c.
does doing d ie..closing context cause problems in step e or later
on....
3. What happens if we dont close the intial context...
Does WLS 452 intelligently garbage collect them and release any
resources held internally by the initial context object?
How much is the overhead?
Is Initial Context heavy ie.. holds resources like sockets/etc...?
thanks in advanceI do not have an exact answer for most of your questions. From my
experience and from research, I would suggest that the following is safe:
Within an HTTP request, instantiate an InitialContext and using it for the
duration of the request only (i.e. same auth info, same thread). I believe
the same holds true for home interfaces. That is within the "web
container", though. The choice of "caching" the context in the "ejb
container" is a even easier for threads (ejb guarantee -- only one thread
with access to your ejb at a time), but harder due to lack of clear spec on
auth issues.
Cameron Purdy, LiveWater
"S Rajesh" <[email protected]> wrote in message
news:[email protected]...
Hi all
Environment: Weblogic 452
JNDI implementation of Weblogic 452 is based on Javasoft JNDI 1.1 and
SPI specifications.(refer: Developer docs for 452).Javadoc of
InitialContext for JNDI 1.1 says (refer -
http://java.sun.com/products/jndi/javadoc/index.html)
An InitialContext instance is not synchronized against concurrent access
by multiple threads. Multiple threads each manipulating their own
InitialContext
instances need not synchronize. Threads that need to access a single
InitialContext instance concurrently should synchronize amongst
themselves
and provide the necessary locking
1. Does reusing the InitialContext object accross threads for lookup and
then execution of remote methods cause any problems? or should we
synchronize access?
How weblogic 452 handles this.
2. Let say i do this
a. get InitialContext
b. do lookup
c. get remote reference
d. close context
e. execute methods on the remote reference got in step c.
does doing d ie..closing context cause problems in step e or later
on....
3. What happens if we dont close the intial context...
Does WLS 452 intelligently garbage collect them and release any
resources held internally by the initial context object?
How much is the overhead?
Is Initial Context heavy ie.. holds resources like sockets/etc...?
thanks in advance -
How can I change the initial iCloud account without reinstalling?
i install mountain lion, and set up the icloud with a new @icloud account, however, I have a @gmail account already and used on my iphone4, I want to share information between these devices, so I log out @icloud and log in with @gmail account, contact information is OK, however, when I use the messeage, mac use @icloud to send message, can I change the initial icloud account or should I reinstall?
You can change the Apple ID in the Users & Groups preference pane.
-
Can we change the initial extent size of tablespaces
Hi All,
Can we change the initial extent size of tablespaces.
Oracle version-11.2.0.1
OS - IBM AIX
Please suggest.
Thanks and Regards,There is no way to redefine the initial extent but by dropping/recreating it. But you can try to deallocate the unused space beyond the High Water Mark (alter table table_name deallocate unused keep 0;), as shown on the next demo:
Madrid @ Re: Resizing initial extent
Regards
Girish Sharma -
I want to update my applications I keep on entering the password and it keeps asking me about it and again I enter it and nothing happens although it is correct I can download new apps but can't update the old ones
Then you will need the password for the old account in order to update the app.
apps are tied to the apple id that was used to purchase the app.
FAQ apple id http://support.apple.com/kb/HT5622?viewlocale=en_US -
Why My iPad 3 iOS 6 apps stores can't show the iPhone apps
Why My iPad 3 iOS 6 apps stores can't show the iPhone apps..
Devices connecting to the app store are detected and the appropriate apps are shown for the device...for example, a Mac OS X computer will only display the Mac App Store apps, an iPhone will only display the apps that will work on the iPhone, an iPad will only display the apps that will work on the iPad, and in this case there are apps that work on both the iPad and iPhone so those apps are displayed but not the iPhone-only apps.
-
i downloaded creative cloud to my mac as I wanted Illustrator. But while I can find the creative cloud app, I can't access the actual illustrator program. Help!
Hi Amy,
Kindly try the below mentioned links.
Creative Cloud Help | Download, install, update, or uninstall apps
Adobe CC 2014 Direct Download Links: Creative Cloud 2014 Release | ProDesignTools
Thanks,
Atul Saini -
ClassNotFoundException for initial-context-factory using foreign JMS p.
Hi,
I am currently working on migrating an application from weblogic 9 to weblogic 10 and I bumped into this issue while MDB connecting to JMS.
[Loaded cz.jaksky.riskscenario.beans.RiskScenarioServiceLocalHome from file:/C:/SVN/app-WLS10-FRESH/app-deploy/servers/myserver/tmp/_WL_user/performance/nyubkw/point-interfaces.jar]
<17-Sep-2012 11:01:27 o'clock CEST> <Warning> <EJB> <BEA-010061> <The Message-Driven EJB: PerformanceAsyncRequestBean is unable to connect to the JMS destination: wls.AsyncQueue. The Error was:
javax.naming.NoInitialContextException: Cannot instantiate class: cz.jaksky.common.jms.JMSInitialContextFactory [Root exception is java.lang.ClassNotFoundException: cz.jaksky.common.jms.JMSInitialContextFactory]
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:657)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.InitialContext.<init>(InitialContext.java:197)
at weblogic.deployment.jms.ForeignOpaqueReference.getReferent(ForeignOpaqueReference.java:182)
at weblogic.jndi.internal.WLNamingManager.getObjectInstance(WLNamingManager.java:96)
at weblogic.jndi.internal.ServerNamingNode.resolveObject(ServerNamingNode.java:377)
at weblogic.jndi.internal.BasicNamingNode.resolveObject(BasicNamingNode.java:856)
at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:209)
at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:214)
at weblogic.jndi.internal.WLEventContextImpl.lookup(WLEventContextImpl.java:254)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:411)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at weblogic.jms.common.CDS$2.run(CDS.java:486)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.jms.common.CrossDomainSecurityManager.runAs(CrossDomainSecurityManager.java:131)
at weblogic.jms.common.CDS.lookupDestination(CDS.java:480)
at weblogic.jms.common.CDS.lookupDDAndCalloutListener(CDS.java:345)
at weblogic.jms.common.CDS.access$100(CDS.java:41)
at weblogic.jms.common.CDS$DDListenerRegistrationTimerListener.timerExpired(CDS.java:193)
at weblogic.timers.internal.TimerImpl.run(TimerImpl.java:273)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)
Caused by: java.lang.ClassNotFoundException: cz.jaksky.common.jms.JMSInitialContextFactory
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:46)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:654)
... 23 more
I am using foreign JMS provider with provided mapping. Config follows:
ejb-jar.xml:
<enterprise-beans>
<message-driven>
<ejb-name>PortfolioRetrieverAsyncRequestBean</ejb-name>
<ejb-class>cz.jaksky.common.async.AsynchronousRequestMessageBean</ejb-class>
<transaction-type>Bean</transaction-type>
<acknowledge-mode>Auto-acknowledge</acknowledge-mode>
<message-driven-destination>
<destination-type>javax.jms.Queue</destination-type>
<subscription-durability>Durable</subscription-durability>
</message-driven-destination>
<message-selector>
<![CDATA[ Service IN ('PortfolioRetriever')
AND MessageType = 'request'
AND BigBox = FALSE
]]>
</message-selector>
</message-driven>
</enterprise-beans>
weblogic-ejb-jar.xml:
<weblogic-enterprise-bean>
<ejb-name>PortfolioRetrieverAsyncRequestBean</ejb-name>
<message-driven-descriptor>
<pool>
<max-beans-in-free-pool>64</max-beans-in-free-pool>
<initial-beans-in-free-pool>1</initial-beans-in-free-pool>
</pool>
<destination-jndi-name>wls.AsyncQueue</destination-jndi-name>
<initial-context-factory>weblogic.jndi.WLInitialContextFactory</initial-context-factory>
<connection-factory-jndi-name>ServiceLocatorAsyncQueueFactory</connection-factory-jndi-name>
</message-driven-descriptor>
<dispatch-policy>PortfolioAsyncQueueWorkManager</dispatch-policy>
</weblogic-enterprise-bean>
jmsconfig-jms.xml
<foreign-server name="TibjmsAsyncServer">
<default-targeting-enabled>true</default-targeting-enabled>
<foreign-destination name="AsyncQueue.LOCAL.prgdwm355410.7001">
<local-jndi-name>wls.AsyncQueue</local-jndi-name>
<remote-jndi-name>AsyncQueue.LOCAL.prgdwm355410.7001</remote-jndi-name>
</foreign-destination>
<foreign-connection-factory name="FTQueueConnectionFactory">
<local-jndi-name>ServiceLocatorAsyncQueueFactory</local-jndi-name>
<remote-jndi-name>FTQueueConnectionFactory</remote-jndi-name>
</foreign-connection-factory>
<initial-context-factory>cz.jaksky.common.jms.JMSInitialContextFactory</initial-context-factory>
<connection-url>tcp://JUSD-FTPOIA.jaksky.com:22542,tcp://JUSD-FTPOB.jaksky.com:22543</connection-url>
</foreign-server>
Module containing this MDB is packed as an ear file with following structure:
APP-INF/lib/modules.jar - contains AsynchronousRequestMessageBean class
APP-INF/lib/interface.jar - contains JMSInitialContextFactory (class used for initial-context-factory)
portfolio-async.jar
META-INF/ejb-jar.xml content pasted above
META-INF/webogic-ejb-jar.xml content pasted above
Weblogic system classpath doesn't contain any application sepcific libraries.
This set up was working for weblogic 9 without any problem. I am just wondering what the problem is whether I am faceing class loading issue or JMS configuration issue and how to resolve it.
Edited by: user13047709 on 18-Sep-2012 07:15
Edited by: user13047709 on 18-Sep-2012 07:16Hi,
When working with a non-WebLogic JNDI provider (or a non-WebLogic JMS provider), the non-WebLogic client classes must be made available to the classloader of the calling application in WebLogic Server. This is usually accomplished by adding them to the system classpath.
In your case, WebLogic is looking for a proprietary/foreign JNDI Context Factory class named "cz.jaksky.common.jms.JMSInitialContextFactory", which means you need to make sure that a jar/dir that contains the non-WebLogic class "JMSInitialContextFactory.class" is in the classpath.
The configuration for this should be similar in WL9 and WL10. It could be that your classpath is already setup to reference the foreign class, but it refers to a directory/jar that you haven't setup yet on your WL10 host.
HTH,
Tom -
How to configure initial-context-factory and provider_url on Websphere MQ
I have a few questions about WebSphere MQ. Currently, my application is able work well with other JMS provider. But I would like to move to use WebSphere instead.
Can anyone suggest me how to configure the application connecting WebSphere?
� I�m using the Initial java naming factory as bellows: com.sun.jndi.fscontext.RefFSContextFactoryIs it the correct class?
� About the java-naming-factory-url, How do I know what object that I should use? I found this example in JMSAdmin.config � iiop://localhost:7555� What�s iiop ?
� What jar file that I should add in my classpath?Hi,
You have a few options...
1. Use WebSphere Application Server as the JNDI provider
2. Don't use JNDI
3. Use the File System Context as the JNDI provider
Exploring these options in a bit more detail...
1. Use WebSphere Application Server as the JNDI provider
Assuming you have WAS, the best way of obtaining your queue is to define the Queue and Queue Connection Factory objects in WAS using the admin console, then obtain them from the Initial Context as per the following article
http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/index.jsp?topic=/com.ibm.websphere.express.doc/info/exp/ae/rnam_example_prop2.html
If you prefer not to do JNDI lookups in your code a great alternative is to use Spring (www.springframework.org). If you haven't come across spring before it's well worth a look. One of it's many features is a bean factory for creating your objects. There is lots of support for retrieving JMS objects from JNDI, so in the main all you have to do is write some XML similar to the following...
<bean id="jndiTemplate" class="org.springframework.jndi.JndiTemplate">
<property name="environment">
<props>
<prop key="java.naming.factory.initial">${jndi.initialContextFactory}</prop>
<prop key="java.naming.provider.url">${jndi.providerUrl}</prop>
</props>
</property>
</bean>
<bean id="queueConnectionFactory" class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiTemplate" ref="jndiTemplate"/>
<property name="jndiName" value="${jndi.queueConnectionFactory}"/>
</bean>
<bean id="queueName" class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiTemplate" ref="jndiTemplate"/>
<property name="jndiName" value="${jndi.queueName}"/>
</bean>There's a bit more to it than this, but not much. I've been meaning to write a tutorial on this for a while so if you're interested let me know.
2. Don't use JNDI
This approach involves using the creating the native MQ Queue Connection Factory and Queue classes. You can hard code this, but it's much better to abstract it from your application. Again you can use Spring. The definition would look something like the following...
<bean id="MQJMS_TP_CLIENT_MQ_TCPIP"
class="org.springframework.beans.factory.config.FieldRetrievingFactoryBean">
<property name="staticField">
<value>com.ibm.mq.jms.JMSC.MQJMS_TP_CLIENT_MQ_TCPIP</value>
</property>
</bean>
<bean id="queueConnectionFactory" class="com.ibm.mq.jms.MQQueueConnectionFactory">
<property name="transportType" ref="MQJMS_TP_CLIENT_MQ_TCPIP" />
<property name="queueManager" value="${mq.queueManager}" />
<property name="hostName" value="${mq.host}" />
<property name="port" value="${mq.port}" />
<property name="channel" value="${mq.channel}" />
</bean>
<bean id="publishInvoiceQ" class="com.ibm.mq.jms.MQQueue">
<constructor-arg value="${mq.queueName}" />
</bean>
3. Use the File System Context
The file system context is just like a JNDI context, but instead of using a url like iiop://host:port you have to specify a file system url. Because FSContext is just another JNDI context you can still use the spring configuration from option 1, but just change the relevant parameters.
In order to define you queues and queue connection factory using the File System Context, you need to download a swing application called JMS Admin. Get it here
http://www-1.ibm.com/support/docview.wss?rs=171&uid=swg24004691&loc=en_US&cs=utf-8&lang=en
With regards your specific questions...
IIOP is just another communication protocol. If you want more details I'm sure typing "what is iiop" into google will provide plenty of hits.
I'll do my best to answer the remain two tomorrow - I wrote an application a few months ago which used the File System Context, but don't have the details to hand. -
Which apple store in usa can i buy the iphone 5 factory unlock
which apple store in USA can I buy the iphone 5 factory unlock
Well, it is a requirement in the UK that they be sold unlocked. If you remember when the iPhone was first launched in the UK, all the phones were carrier locked to 02 in an exclusive deal and then they became unlocked when Vodafone, 3 and Orange etc, started to be able to offer the iPhone.
Unfortunately, the US is different, but there are 3 carrier to choose from now with AT&T, Verizon and Sprint. For a few years it was only AT&T. Just works differently out there, depending on networks and agreements with the phone carriers. -
How can I get the servlet Context from a WebService Implementation?
I have made a webservice endpoint, using the conventional way (WSDL->wsimport->Java interface->implementation) . I need to get the servlet context below the implementation class. I haven't found any way to get the servletContext though. Any clues? Any help will be greatly appreciated.
yes i can found the words's unicode form Cmaps where may be at the type of tounicde and another Cmaps table just like "Adobe-GB1-GBK-EUC" ,but when the word dont have either of them how can i do? when i write a chinese word "一",it just the winansi encoding , there is not Cmap for me to use to change the "G208f" to the word "一"'s unicode value.
best wishes thank you very much -
As I open my DropBox App the keybioard appears adn prevents me from entering my password to access my DropBox content. How do I move the alphabet keyboard on my iphone 5 iOS 8? It is stuck on my DropBox app and I can't slide the keyboard down.
Well, as an AT&T user, APN settings are governed by the carrier file, and we cannot change them. I've not used the configuration utility, so I'm "dumber" than you! See if this support document will help you out any. http://support.apple.com/kb/HT4839.
-
I can't access the audio memo apps but i can see under usage - manage storage that all the files are located in icloud. how to extract .wav files from icloud if the apps is no longer responding to fileshare in itunes? Thanks.
yes it was solved some time ago. i cant remember exactly but i think i disconnected from the internet and tried accessing the audio apps (or maybe i had accessed the apps first then only turned off internet i cant remember) thereafter the files were in my local apps and then I turned off use icloud. i suggest you backup your ipad on itunes before trying anything. All the best - hope you solve your problem.
Maybe you are looking for
-
Error message when trying to install itunes 9
I checked already to see if this was answered earlier and it isnt. so. When i open the itunes installer and right after it prepares to install i get the message "invalid drive:F:/" and then itunes installer tells me that it cannot complete the instal
-
BlackBerry Curve 8520 - in need of unlocking code
I want to unlock my BB Curve 8520, so that I can use it in Europe with a local sims card when visiting family, etc. Anybody any idea how to do that?? I asked ATT, but they told me I had to go to RIM to get this............ RIM says I have to to my c
-
I purchased a new MacBook Pro and when transferring files iphoto did not transfer. I have a question mark in the place of the icon. My pictures are in library but can't properly access iphoto. Thank you
-
Sql server analysis server - cube hierarchy - Hide ALL without disabling ISAGGREGATE to false
Hi, In Cube custom hierarchy, I have made ISAGGREGATABLE to TRUE inorder to make non-aggregatable error to resolve, Now ALL appears at top level - but I need to hide this without changing the property back to FALSE. Any workaround ? Thanks in Advance
-
Encore CS5.1 Access Denied
I am running the program as administrator and no luck. Every time I try to build as a DVD or DVD folder I get this error. Also This Encore project was sent to Encore from Premier Pro CS5.1. My project has about a 2 gig video and the rest is 10 slide