JNDI Lookup Problem (General Problem)
hi all,
i am newbie on bea products, but i have some experience on java technologies, how i fount on bea documentations and forums many people has the same problem like this, can anybody help us (me)?
problem: how is it possible to write simple client for j2ee server application? i found some posts about jndi lookup, and fount about j2ee client, but is there any doc or example how to write this j2ee client ???
i worked with many application servers and i have no problem with them (JBoss, Sun App Server, IBM Websophere, Oracle AS etc.)
some people told about jndi tree on Web Logic Server Administration console , i found this tree i my session beans looks like :
Binding Name:
TimestenExampleTimestenExample_jarInsertSubscriberBean_InsertSubscriber
Class:
test.InsertSubscriberBean_o7jk9u_InsertSubscriberImpl_1000_WLStub
why is so strange name for class or binding name ????
my session bean name is : InsertSubscriber
and it's implementation : InsertSubscriberBean
how i can lookup from client ?????
can anybody show me code snippet ???
my client looks like :
import java.util.Hashtable;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NameClassPair;
import javax.naming.NamingEnumeration;
import javax.naming.NamingException;
import org.hibernate.property.Dom4jAccessor.ElementGetter;
public class Client {
public static void main(String[] args) {
Context ctx = null;
Hashtable ht = new Hashtable();
ht.put(Context.INITIAL_CONTEXT_FACTORY,
"weblogic.jndi.WLInitialContextFactory");
ht.put(Context.PROVIDER_URL, "t3://192.9.200.222:7001");
try {
ctx = new InitialContext(ht);
InsertSubscriber usagefasade = (InsertSubscriber) ctx
.lookup("java:comp/InsertSubscriber");
} catch (NamingException e) {
e.printStackTrace();
} finally {
try {
ctx.close();
} catch (Exception e) {
e.printStackTrace();
}can anybody show me what is there incorrect ????
oo yes and i have weblogic.jar file into my client classpath.
Hi,
Your EJB client looks fine.
You should use the JNDI name of your ejb while doing the lookup. i.e :
InsertSubscriber usagefasade = (InsertSubscriber) ctx.lookup("..use JNDI name of EJB...");
You can use the JNDI name of the EJB that you see in the JNDI tree of weblogic. [don't use Binding Name or Class name]. you can also specify the JNDI name by "jndi-name" attribute in weblogic-ejb-jar.xml.
for more info:
http://e-docs.bea.com/wls/docs81/ejb/ejb11.html
Thanks,
Qumar Hussain
Similar Messages
-
I have a JMS topic defined in a standalone oc4j (11g) and I am doing a JNDI lookup on that from an application that runs in embedded oc4j of jdev. Look up fails but if I add the same topic in jms.xml of embedded oc4j, it starts to work fine. My point is topic name shouldn't be needed in jms.xml of embedded oc4j i.e. client side (topic is present in remote oc4j and rightly defined in jms.xml of that oc4j). I verified that by creating a command line java application and that one is able to do lookup on the same topic available in the standalone oc4j.
I guess this problem is not specific to the label JDEVADF_MAIN_GENERIC_061111.1900.4245, it was there before also.
Any pointers on what could be wrong when I run in JDev?
Thanks,
VishalPlease use the internal email distribution list jdev_us for 11 related questions.
-
JNDI lookup problem in WAS 5.1
Hello all,
I have generated an EAR using XDoclet and MyEclipse. When I deploy this EAR on WAS 5.1, I get the following exception:
javax.naming.NameNotFoundException: Context: WarHog/nodes/WarHog/servers/server1, name: ejb/TEDIObjectManagerLocal: First component in name TEDIObjectManagerLocal not found. Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0
at org.omg.CosNaming.NamingContextPackage.NotFoundHelper.read(NotFoundHelper.java:85)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java(Compiled Code))
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java(Compiled Code))
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled Code))
at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
at com.ibm.rmi.iiop.CDRInputStream.readBoxedIDLEntity(CDRInputStream.java:2112)
at com.ibm.rmi.iiop.CDRInputStream.readIDLValue(CDRInputStream.java:2177)
at com.ibm.rmi.iiop.CDRInputStream.fast_read_value(CDRInputStream.java:1734)
at com.ibm.rmi.io.IIOPInputStream.readValueType(IIOPInputStream.java:2085)
at com.ibm.rmi.io.IIOPInputStream.readObjectField(IIOPInputStream.java:2057)
at com.ibm.rmi.io.IIOPInputStream.inputClassFields(IIOPInputStream.java:1765)
at com.ibm.rmi.io.IIOPInputStream.inputObjectUsingClassDesc(IIOPInputStream.java:1348)
at com.ibm.rmi.io.IIOPInputStream.continueSimpleReadObject(IIOPInputStream.java:420)
at com.ibm.rmi.io.IIOPInputStream.simpleReadObjectLoop(IIOPInputStream.java:404)
at com.ibm.rmi.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:347)
at com.ibm.rmi.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:200)
at com.ibm.rmi.iiop.CDRInputStream.read_value(CDRInputStream.java:1367)
at com.ibm.rmi.util.ProxyUtil.copyObject(ProxyUtil.java:450)
at com.ibm.CORBA.iiop.UtilDelegateImpl.copyObject(UtilDelegateImpl.java:789)
at javax.rmi.CORBA.Util.copyObject(Util.java:333)
at com.wdc.tedi.interfaces._TransformationEngine_Stub.transform(_TransformationEngine_Stub.java:268)
at com.wdc.tedi.web.TestHarnessBean.translate(TestHarnessBean.java:42)
at com.wdc.tedi.web.TestHarnessBean.setDataBlob(TestHarnessBean.java:80)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)First of all, I don't really understand what the error means. Is it that the JNDI lookup failed when one of my beans tried to do a lookup on 'ejb/TEDIObjectManagerLocal'? I believe there's some configuration that went wrong (EJB reference binding or something) when I deployed the EAR. The reason I don't think it's a faulty code is because the EAR runs like a charm when I deploy it on Oracle 10g and Weblogic.
I am really stuck on this problem and shall appreciate any help that I can get. I can send the code, xdoclet tags and configuration if that might assist someone.
Thanks
-ybh6336Hello all,
I'm still stuck on this issue. Following are the entries related to my
application when I do a 'dumpNameSpace':
28 (top)/nodes/WarHog/servers/server1/ejb/tedi/TEDIObjectManager
28
com.wdc.tedi.interfaces._TEDIObjectManagerHome_Stub
29 (top)/nodes/WarHog/servers/server1/ejb/tedi/DSValueLookup
29
com.wdc.tedi.interfaces._DSValueLookupHome_Stub
30 (top)/nodes/WarHog/servers/server1/ejb/tedi/TransformationEngine
30
com.wdc.tedi.interfaces._TransformationEngineHome_StubObservations:
- I only see the namespace entries for my Session beans. There's one
entity bean also which does not show up.
- I don't see anything for the Local Home interfaces, it shows only the
Home interfaces.
As additional information, I'm looking up 'TEDIObjectManagerLocal'
using 'ejb/TEDIObjectManagerLocal'. I also tried using 'local:ejb/ejb/TEDIObjectManagerLocal' (as Karthyk suggested) and
'java:comp/env/ejb/TEDIObjectManagerLocal', but that does not work
either.
Also, the XDoclet tags that I use to generate the interfaces for
TEDIObjectManager bean are as follows:
/* @ejb.bean name="TEDIObjectManager"
* display-name="TEDIObjectManager"
* description="TEDIObjectManager"
* jndi-name="ejb/tedi/TEDIObjectManager"
* local-jndi-name="ejb/TEDIObjectManagerLocal"
* type="Stateless"
* view-type="both"
* @ejb.util generate="physical"
* @ejb.ejb-ref ejb-name="TEDIObject"
* view-type = "local"
* ref-name = "ejb/TEDIObjectLocal"
* @oc4j.bean jndi-name="ejb/tedi/TEDIObjectManager"
*/My ejb-jar.xml looks like following for that bean:
<session >
<description><![CDATA[TEDIObjectManager]]></description>
<display-name>TEDIObjectManager</display-name>
<ejb-name>TEDIObjectManager</ejb-name>
<home>com.wdc.tedi.interfaces.TEDIObjectManagerHome</home>
<remote>com.wdc.tedi.interfaces.TEDIObjectManager</remote>
<local-home>com.wdc.tedi.interfaces.TEDIObjectManagerLocalHome</local-home>
<local>com.wdc.tedi.interfaces.TEDIObjectManagerLocal</local>
<ejb-class>com.wdc.tedi.ejb.TEDIObjectManagerSession</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
<ejb-local-ref >
<ejb-ref-name>ejb/TEDIObjectLocal</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<local-home>com.wdc.tedi.interfaces.TEDIObjectLocalHome</local-home>
<local>com.wdc.tedi.interfaces.TEDIObjectLocal</local>
<ejb-link>TEDIObject</ejb-link>
</ejb-local-ref>
</session>AND following for the bean that is referencing it:
<session >
<description><![CDATA[TransformationEngine]]></description>
<display-name>TransformationEngine</display-name>
<ejb-name>TransformationEngine</ejb-name>
<home>com.wdc.tedi.interfaces.TransformationEngineHome</home>
<remote>com.wdc.tedi.interfaces.TransformationEngine</remote>
<local-home>com.wdc.tedi.interfaces.TransformationEngineLocalHome</local-home>
<local>com.wdc.tedi.interfaces.TransformationEngineLocal</local>
<ejb-class>com.wdc.tedi.ejb.TransformationEngineSession</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
<ejb-local-ref >
<ejb-ref-name>ejb/TEDIObjectManagerLocal</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local-home>com.wdc.tedi.interfaces.TEDIObjectManagerLocalHome</local-home>
<local>com.wdc.tedi.interfaces.TEDIObjectManagerLocal</local>
<ejb-link>TEDIObjectManager</ejb-link>
</ejb-local-ref>
</session>The entries in ibm-ejb-jar-bnd.xmi (generated using MyEclipse) are as
follows for the two beans:
<ejbBindings
xmi:id="Session_bnd_1"
jndiName="ejb/tedi/TransformationEngine">
<ejbRefBindings xmi:id="EJBRefBnd_1"
jndiName="ejb/TEDIObjectManagerLocal">
<bindingEjbRef href="META-INF/ejb-jar.xml#EJBLocalRef_1"/>
</ejbRefBindings>
<enterpriseBean
xmi:type="ejb:Session"
href="META-INF/ejb-jar.xml#Session_TransformationEngine" />
</ejbBindings>
<ejbBindings
xmi:id="Session_bnd_3"
jndiName="ejb/tedi/TEDIObjectManager">
<ejbRefBindings xmi:id="EJBRefBnd_2"
jndiName="ejb/TEDIObjectLocal">
<bindingEjbRef href="META-INF/ejb-jar.xml#EJBLocalRef_2"/>
</ejbRefBindings>
<enterpriseBean
xmi:type="ejb:Session"
href="META-INF/ejb-jar.xml#Session_TEDIObjectManager" />
</ejbBindings>I know I'm swamping the post with code, but please let me know if anyone finds something unusual.
NOTE: When deploying on WAS, in the 'Map EJB references to beans' step, I'm giving the following values for 'TransformationEngine' bean:
Reference binding: ejb/TEDIObjectManagerLocal
JNDI Name: ejb/tedi/TEDIObjectManager
There's one other similar binding that works for 'TEDIObjectManager'
bean:
Reference binding: ejb/TEDIObjectLocal
JNDI Name: ejb/TEDIObject
Everything in ejb-jar and ibm-ejb-jar-bnd.xmi look similar for this working bean, there is one difference though, I do the lookup on this one using 'java:comp/env/ejb/TEDIObjectLocal', but I've already tried that for the other one.
Really appreciate your time.
Thanks
-yogesh -
Hi All
Two separate webapps, have different names for Datasources, on the same host and port. Both application work fine independently.
When we deploy both applications on the same app server(websphere), whichever we executes first gets its datasource from JNDI lookup and works fine, but when we try second application it have problem in finding its data source from JNDI lookup. If we start this second application first, it will work fine, but now another will have the same problem in its JNDI lookup.
Any idea why.
Thanks
....RanvirHi All
Two separate webapps, have different names for
Datasources, on the same host and port. Both
application work fine independently.
When we deploy both applications on the same app
server(websphere), whichever we executes first gets
its datasource from JNDI lookup and works fine, but
when we try second application it have problem in
finding its data source from JNDI lookup. If we start
this second application first, it will work fine, but
now another will have the same problem in its JNDI
lookup.
Any idea why.
Thanks
....RanvirHi Ranvir,
Do you mean you try to reach the same datasource with different names or do you try to reach different datasources over the same port?
If you try the first issue you shouldn't get any trouble. At least it works fine with JBOSS for example.
But if you try to do the latter in my oppinion you don't have a JNDI problem but a problem with socket binding: the two different databases must be contacted over different ports.
What do WebSphere's logs tell?
Best regards
Andy -
Hi,
I have a client Java application accessing a session EJB in a remote JBoss J2EE server. I'm using JWS 1.2 to deploy my application but when I do a JNDI lookup to get access the the remote's object home interface I get this error:
"Need to specify class name in environment or system property, or as an applet parameter, or in an application resorce file: java.naming.factory.initial"
All the jar files are signed and the JNPL file contains <all-permissions/>. This is the code that triggers the exception
jndiContext = new InitialContext();
homeRMIReference = jndiContext.lookup(C_SERVICE_NAME);
Any help would be appreciated.
Thanks in advance,
RafaelHi,
I've finally found the origin of the problem.
1. JNDI uses a minimum set of properties during initialization phase:
java.naming.factory.initial
java.naming.factory.url.pkgs
java.naming.provider.url
Therefore these properties must be set in the <resource> topic of the JNLP file. The value of these properties is defined in the jndi.properties file that you can find in jbossjmx.ant.jar (within the jboss/client directory)
2. You have to add the JBoss files to your bundle. For doing so I've unjared all the .jar files within the jboss/client directory; afterwards I have jared them in a single file "jboss.jar" and I've signed the file. I've added jboss.jar to the <resource> tag within the JNLP file (Note that I've added all the jboss files just to do quick check but usually you will have to add only those files you need (it doesn't make sense to deploy all JBoss files in each client application)
I hope this helps,
Rafael -
JNDI lookup problem (II)
after reading the reply from Michael Lehmann and changed to 3101. It did connect to the JNDI! now. the problem turn to the domain/application name in the provider_url:
env.put(Context.PROVIDER_URL, "ormi://10.6.208.6:3101/XXX");
my question is how you guys define the domain/application name? and how the app server knows which OC4J containing this domain/application for i have several OC4J installed on my appserver?
Thanks.how you guys define the domain/application name? and
how the app server knows which OC4J containing this >domain/application for i have several OC4J installed on >my appserver?The application name is part of the deployment. On Oracle9iAS for example, I deploy the ear file with a command like this:
dcmctl redeployApplication -file myEJB.ear -application myEJB
and myEJB becomes the application part of the provider URL.
On a stand alone OC4J the command looks like:
java -jar <oc4j_home>\j2ee\home\admin.jar ormi://127.0.0.1/ admin **** -deploy -file myEJB.ear -deploymentName myEJB
As for deploying across clusters, this is the magic of DCM or Oracle Enterprise Manager. If you have configured a cluster the DCM infrastructure takes care of the heavy lifting for you. For more information on DCM and related administrative operations, see:
http://download-west.oracle.com/docs/cd/A97688_08/generic.903/a97681/dcm2.htm#620714
Where it gets tricky is having a remote client lookup as in your initial example versus working in a client colocated with the EJB. Right now in 9.0.3 colocated lookups work automatically whereas remote lookups require the workaround of identifying the RMI port number or using jndi.properties file to hide the range of ports your client might try.
In 9iAS 9.0.4, as per this note:
9.0.3 / EJB / RMI-Ports / Islands-Configuration??
the process manager gets a new API that lets the client inquire over which ports should be used.
Mike. -
Problem deploying cmp bean invoking another cmp bean using jndi lookup
I have a cmp BeanA that invokes another cmp BeanB, so I am using a jndi lookup in BeanA to download the localhome object to BeanB using the following:
Context ctx = new InitialContext();
home = (LocalAddressHome) ctx.lookup("java:comp/env/ejb/BeanBHomeRef");
then I specify the ejb/BeanBHomeRef, entity bean, local, BeanB's local home and component interface in EJB ref. when I am packaging BeanA
I also package BeanB in a separate jar file.
When I attempt to deploy the application it throws strange exception that says the folowing:
java.lang.IllegalArgumentException: BeanBEJB says it links to an ejb called BeanBEJB of local home class LocalBeanBHome but no bean with this local home c
lassname and type can be found in this ejb-jar.
yet when I un-jar the package, these class files exitsts.
When I go ahead and delete the reference to BeanB from the BeanA package file, I am able to deploy the application but then correctly fails on jndi lookup.
I have been able to open the cmpcustomer.ear sample application that comes with RI and execute it without any problem. But when I to package the same beans for example CustomerBean and it won't even allow me to create the customer.jar file. I get a screen full of errors.......
I am using Sun RI 1.3.01, is there a known bug that I am not aware of? Is there a fix around it?
Is there any another way to get the home ref. to BeanB so I can invoke create() method?
Any advice or suggestions?
thanksl
-kaisaabWhat app server are you using? may be I can help you
--Ashish Saraf -
11g preview version 3: JNDI Lookup problem when calling PL/SQL webservice
Hi,
I am experiencing a problem when calling a PL/SQL Webservice from a BPEL flow.
When I am trying to test my BPEL flow from the SOA Console I get a "Error doing JNDI lookup on target jdbc/MyDBDS"
The composite application including the BPEL flow is deployed in one application. "CompositeApp" and the web service in another Application called
"WebServiceApp".
Both applications are deployed on the same built in OC4J Application Server
If I test the webservice in isolation from the SOA console it works. It also seems to be working if the webservice and the and the BPEL flow is in the same project.
If anyone has any ideas on this one I would be very greatful.
Thanks in advancetry creating the MyDBDS connection as an application resource in both applications.
-
Problem in JNDI lookup.
Hi,
I have a JSP running on tomcat. And it accesses an EJB running on weblogic thru a local bean. When the following JNDI lookup code is executed, I get errors. Errors follow the code. Please Help.
Thanks!
public InitialContext getInitialContext() throws NamingException
// Utils.Trace("****** in getInitialContext ******");
// web logic server and jsp engine NOT weblogic
if (url != null && url.length() > 0)
//Hashtable env = new Hashtable();
Properties env = new Properties();
env.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
// assumes that JSP and EJB container are on the same box,
// otherwise EJB hostname should be specified
//env.put(Context.PROVIDER_URL, "t3://localhost:7001");
env.put(Context.PROVIDER_URL, url);
System.out.println("Using t3 services");
return new InitialContext(env);
// weblogic server and weblogic jsp, or inprise server (JBuilder's default JSP)
else
System.out.println("Not Using t3 services");
return new InitialContext();
The ERRORS are
=====================================================================
org.apache.jasper.JasperException: weblogic/common/T3Services
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:248)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2396)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:380)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:533)
at java.lang.Thread.run(Thread.java:479)
root cause
javax.servlet.ServletException: weblogic/common/T3Services
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:497)
at org.apache.jsp.login_jsp._jspService(login_jsp.java:276)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:136)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:204)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2396)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:380)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:533)
at java.lang.Thread.run(Thread.java:479)Your JSP trying to load the weblogic context factory to perform the lookup, but can't find it. Your servlet engine must have access to the weblogic.jndi.WLInitialContextFactory class (in weblogic.jar).
-
Problem in Jndi lookup for ITaskService
HI,
I am trying to initiate oracle bpm Human task programatically by using Java remotely.
for this I am using following JNDI lookup for ITaskService.
Hashtable ht = new
Hashtable<IWorkflowServiceClientConstants.CONNECTION_PROPERTY,java.lang.String>();
ht.put(IWorkflowServiceClientConstants.CONNECTION_PROPERTY.EJB_INITIAL_CONTEXT_FACTORY,
"weblogic.jndi.WLInitialContextFactory");
ht.put(IWorkflowServiceClientConstants.CONNECTION_PROPERTY.EJB_PROVIDER_URL, "t3://localhost:7001");
ht.put(IWorkflowServiceClientConstants.CONNECTION_PROPERTY.EJB_SECURITY_PRINCIPAL, "username");
ht.put(IWorkflowServiceClientConstants.CONNECTION_PROPERTY.EJB_SECURITY_CREDENTIALS, "password");
Context ctx = new InitialContext(ht);
ITaskService taskService = (ITaskQueryService)ctx.lookup("ejb/bpel/services/workflow/TaskServiceBean");
taskService.initiateTask(task);
It the right approach or not.
Please help.To access human workflow api remotely try using the following code :
Map properties = new HashMap();
properties.put(IWorkflowServiceClientConstants.CONNECTION_PROPERTY.EJB_PROVIDER_URL, "t3://localhost:8001");
properties.put(IWorkflowServiceClientConstants.CONNECTION_PROPERTY.EJB_SECURITY_CREDENTIALS, "welcome1");
properties.put(IWorkflowServiceClientConstants.CONNECTION_PROPERTY.EJB_SECURITY_PRINCIPAL, "weblogic");
IWorkflowServiceClient wfSvcClient =
WorkflowServiceClientFactory.getWorkflowServiceClient(WorkflowServiceClientFactory.REMOTE_CLIENT, properties, null);
//Get the task query service
ITaskQueryService querySvc = wfSvcClient.getTaskQueryService();
//Login as weblogic
IWorkflowContext ctx = querySvc.authenticate("weblogic","welcome1".toCharArray(),null);
after getting the workflow context, you can call any method like query task list. perform actions etc. just see the api doc.
Regards,
Anshul -
JPA's EntityManagerFactory jndi lookup problem
Hi,
I need to do jndi lookup of EntityManagerFactory from DAO layer. I don't want to inject entitymanagerfactory in a session bean.
I am using weblogic 10.0 . I could do a jndi lookup for jboss and oracle servers but not for weblogic
I have tried below code which fails:
ic.lookup("java:comp/env/EJB30");
ic.lookup("java:comp/env/persistence/EJB30");
<?xml version="1.0" encoding="windows-1252" ?>
<persistence xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
version="1.0" xmlns="http://java.sun.com/xml/ns/persistence">
<persistence-unit name="EJB30" >
<jta-data-source>
jdbc/empDS
</jta-data-source>
<class>
com.Department
</class>
<class>
com.Employee
</class>
</persistence-unit>
</persistence>
Error is:
javax.naming.NameNotFoundException: While trying to look up comp/env/EJB30 in /app/ejb/DeptEJB30.jar#empSessionEJBBean.; remaining name 'comp/env/EJB30'
Regards,
PrashantIn your EJB add the annotation @TransactionManagement(TransactionManagementType.BEAN)
You can use JTA UserTransaction to begin and end transactions, for example
UserTransaction userTransation = null;
Context context = null;
try {
context = new InitialContext();
userTransation = (UserTransaction) context.lookup("java:comp/UserTransaction");
} catch (NamingException e) {
e.printStackTrace();
entityManager = entityManagerFactory.createEntityManager();
userTransation.begin();
entityManager.find(Department.class, 10);
userTransation.commit(); -
unable to get data from database, but i created datasource
pls send one example
with clear stepsdid you add your datasource to the database adapters oc4j-ra.xml or the application servers data-sources.xml?
The jndi lookup for the datasource is carried out against the application servers list of datasources, so you need to add the entry to C:\OraBPELPM_1\integration\orabpel\system\appserver\oc4j\j2ee\home\config\data-sources.xml -
Panic/Block after update download! Unique case or general problem?
Yesterday, June 12 in the morning (Europe), i have downloaded a automatic Apple update, after that my MacBook Pro 13'' is going in Panic, noway to deblock it... a am a unique case or there is a general problem?
You are not unique sorry to say.
Thunderbolt Software Update 1.2 Causes Boot Failures
Thunderbolt Update plaguing MacBook Pros with kernel panics -
JNDI NIS object access problem
JNDI NIS object access problem:
Hi all,
After long fight, i'm now able to connect to my NIS server on my network. the initial context factory is 'com.sun.jndi.nis.NISCtxFactory' and provider url are given and i obtain namingennumeration of items in the NIS directory.
purpose of my project:
using ypcat command we can view the services,passwd,host... objects in unix.
my project requirement is that i shd open this 'services' object in java (using JNDI probably) and shd access its content.
i'm able to obtain the object and the type of this object is 'NISCtxServices' defined in 'com.sun.jndi.nis.NISCtxFactory' package, but all the classes and methods except some are not public and so im not able to use almost all the methods in this class 'NISCtxServices' .
Can any one help me in accessing the information inside this object.
Thanks in advance! and i'm waiting!It's because JFrame does not have a public progessbar variable, only your subclass has that.
//change this
JFrame frame = new ProgressBarDemo();
//to this
ProgressBarDemo frame = new ProgressBarDemo(); -
I've noticed this especially when I youtube or video stream for a while. Switching between tabs takes 3-4 seconds.
Definitely a memory leak! Is it a general problem or addon specific?
Also, when I try to close firefox and restart it, the process doesn'y get killed with the normal Command + Q in Mac.
I need to use Force Quit instead.Try updating Flash. You appear to be running an older version dating from September 2010 which might be the cause of the problem. Download from http://get.adobe.com/flashplayer/
If the problem persists after updating, try running Firefox in [[Safe Mode]]. If it functions properly in that configuration, then one of your add-ons is the culprit.
Maybe you are looking for
-
How do you structure a .book with an EDD?
Hi all, I am learning how to convert legacy, unstructured FM documents into structured FM documents and need some help. So, I created a conversion table from my unstructured documents, created the EDD, applied the EDD to the unstructured document to
-
Reg:Soap,RFC,MDM
Hi All, The existing interface is, The webservice(Soap) is being triggered and it is being sent to RFC(Synchronous) flow. Now the requirement is changed to, the response message alone needs to be sent to Soap as well to MDM paralley Could anyone
-
How can I copy and paste border style in the new Number? In the previous version, I'm able to do this by allowing border selection, now I can't.
-
Increasing the options with the Composition Widgets
Can the Muse team please look at giving us more options within the widget options? For example the autoplay feature. Can we have this so it can play once then stay on or off? As at the moment all we can do is change it to 0.1 seconds and it constantl
-
Derived column syntax help needed
I am struggling getting the following case statement into the derived column format in SSIS CASE WHEN SUBSTRING(REPLICATE('0', 9 - LEN(Data)) + CAST(Data AS VARCHAR(9)), 4, 6) IS NULL THEN 0 ELSE RTRIM(SUBSTRING(REPLICATE('0', 9 - LEN(Data)) + CAST(