Getting LinkException in Weblogic9.2
Getting some strange exception in Weblogic9.2. Same configuration is working fine in JBoss 4.2
My server configuration looks something like this,
mydomain
|
myserver
|
MyApp.ear
|
myejbs.jar
myweb.war
myejbs.jar has a session bean (MySession) which has both local and remote interface exposed.
I have a client namely myclient.java residing in myclient.jar archive and which is placed in the server classpath. myclient.java is being invoked by quartz trigger. In myclient.java, i am looking up the localhome for MySession bean, but it's failing with following exception.
Exception:
Stack: javax.naming.LinkException: Root exception is javax.naming.NameNotFoundException: remaining name: /app/ejb/myejbs.jar#MySession/local-home; Link Remaining Name: 'java:app/ejb/myejbs.jar#MySession/local-home'
at weblogic.jndi.internal.WLNamingManager.getObjectInstance(WLNamingManager.java:103)
at weblogic.jndi.internal.ServerNamingNode.resolveObject(ServerNamingNode.java:348)
at weblogic.jndi.internal.BasicNamingNode.resolveObject(BasicNamingNode.java:856)
at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:209)
at weblogic.jndi.internal.WLEventContextImpl.lookup(WLEventContextImpl.java:269)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:362)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at com.mformation.ejb.session.schedulesession.scheduleRunJob.getScheduleSessionLocal(scheduleRunJob.java:613)
at com.mformation.ejb.session.schedulesession.scheduleRunJob.execute(scheduleRunJob.java:188)
at org.quartz.core.JobRunShell.run(JobRunShell.java:203)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)
Caused by: javax.naming.NameNotFoundException: remaining name: /app/ejb/wimsejbs.jar#ScheduleSession/local-home
at weblogic.j2eeclient.SimpleContext.resolve(SimpleContext.java:35)
at weblogic.j2eeclient.SimpleContext.resolve(SimpleContext.java:39)
at weblogic.j2eeclient.SimpleContext.lookup(SimpleContext.java:59)
at weblogic.j2eeclient.SimpleContext.lookup(SimpleContext.java:64)
at weblogic.jndi.factories.java.ReadOnlyContextWrapper.lookup(ReadOnlyContextWrapper.java:45)
at weblogic.jndi.internal.AbstractURLContext.lookup(AbstractURLContext.java:130)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at weblogic.jndi.internal.WLNamingManager.getObjectInstance(WLNamingManager.java:101)
... 10 more
Lookup code:
p.put(Context.INITIAL_CONTEXT_FACTORY, System.getProperty("JNDI_FACTORY"));
p.put(Context.PROVIDER_URL, "t3://localhost:8080");
context = new javax.naming.InitialContext(p);
// find ejb
EJBLocalHome home = (EJBLocalHome) context.lookup("MySessionLoal"); ----->throwing exception at this place.{code}Any idea on what could be the reason??
I suspect, myclient.jar where myclient.java is residing, is outside the ear. Could it be the reason?? If yes then how come it is working in JBos4.2??
Thanks for your response.
I had learned that WebLogic's qname.jar was outdated and that we needed to ensure that the path to our own, more recent, qname.jar was found first*. I even ended up removing the qname.jar from our ear to use WebLogic's own (since I've read, too that 9.2 has an updated qname.jar)*.
Anyway, I'll try it out (put the qname.jar after the WL classpath) and see if it works.
Thanks again.
*I've noted the links below for your reference -
[url http://xfire.codehaus.org/XFire+on+Weblogic+8.1?nocache]
[url
http://www.zac.ch/wiki/dev:java:weblogic:qname]
[url
http://archive.xfire.codehaus.org/user/aad8a2e0708080433h30e9ab70q306a394aff6cbe1a%40mail.gmail.com]
Similar Messages
-
The application was previously using classes in the weblogic.xml.om package, which no longer appears to exist in Weblogic 9.2
Were these classes (such as weblogic.xml.om.ElementEnumeration and weblogic.xml.om.Document) moved to another package with this weblogic9.2 release, is there an additonal jar that would provide this functionalityHi Praveen,
I tried this but still it is not working.
One more thing:
Say if I deploy application in exploded format(MyLibrary, MyWebApp) then it is working fine but when make these as .war files then it is not working.
Thanks for looking into this....
Regards,
Sharath. -
Error in using Control in PageFlow Portal deployment on Weblogic9.2
I am developing a small portal application in Weblogic9.2 using workshop. It uses pageFlow portlets to access a Control that connects to a database. When i add the @Control annotation tag to my pagecontroller and deploy the application it gives the below error ..
Publishing failed
Error with publish task 'Controls Assembly'.
Controls assembly failure running assembly on WAR 'TestPortal' in EAR 'TestPortalEAR'.
java.lang.NullPointerException: null
Error(s) occurred during publish assembly. No modules will be published.
below is the Control tag that I am using.
@Control
private TestMessageControl testMessageControl;
Any ideas ??? thanksHI,
Thanks for replying.
But i am very new to java concepts. So to be little clear let me explain to your points for better understanding.
1) While creating proxy, did you copy the wsdl into the project? Yes i copied wsdl as document steps
2) Can you check logs and try to get more details on the error. There must be more details on the exception after that sentence "2 counts of InAccessibleWSDLException".Could you please tell me which log you talking about. I got this error *"2 counts of InAccessibleWSDLException".* in Jdev while testing. Please let me know path to see the log.
3) Very less chances, but is the WSDL definition of security aspects to invoke service changed ? Not sure about security aspects.. Please tell me how to check it.
4) Make <load-on-startup> value to 1 instead of zero.Please tell me steps to do this
Regards,
Tarak -
Getting error while setting up weblogic
Hi,
I am trying to setup weblogic9.2 mp3 on solaris server.
when running following command then i am getting below error: "java weblogic.WLST"
Exception in thread "main" java.lang.NoClassDefFoundError: weblogic/WLST
I checked the CLASSPATh and its as mentioned below.
/opt/app/bea/wlserver9.2_mp3/patch_weblogic923/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/opt/app/bea/wlserver9.2_mp3/jdk150_12/lib/tools.jar:/opt/app/bea/wlserver9.2_mp3/wlserver9.2/server/lib/weblogic_sp.jar:/opt/app/bea/wlserver9.2_mp3/wlserver9.2/server/lib/weblogic.jar:/opt/app/bea/wlserver9.2_mp3/wlserver9.2/server/lib/webservices.jar::/opt/app/bea/wlserver9.2_mp3/wlserver9.2/common/eval/pointbase/lib/pbembedded51.jar:/opt/app/bea/wlserver9.2_mp3/wlserver9.2/common/eval/pointbase/lib/pbupgrade51.jar:/opt/app/bea/wlserver9.2_mp3/wlserver9.2/common/eval/pointbase/lib/pbclient51.jar:/usr/java/jre/jre/lib/ext/xercesImpl.jar:/opt/app/bea/wlserver9.2_mp3/wlserver9.2/server/lib/webservices.jar:/opt/telstra/si6t/weblogic/adminpack/weblogicAdmin.jar::/opt/tibco/tibrv/8.1/lib/tibrvj.jar
Can anyone please suggest me on this.Before running wlst you should make sure that all environment variables are set, usually setDomainEnv does this. And make sure that nothing overrides the jars and libs that you need to run wlst.
-
Hi
I have a startup class which needs to access a local entity bean. It used to work
in weblogic 6.1, i am currently migrating to 8.1 and i get a Link Exception. I
tried to make the startup class as a listener with in the application (EAR), it
still complains.
Since it worked in 6.1 i am sure there should be a way for a startup class to
access a local EJB, please help, i have seen lot of posting regarding this issue
in the newsgroup but no clear answer.
Any one who faced this problem before and had it solved please do repsond ASAP.
U can mail to me at [email protected]
Thanks
SijuAre you sure the EJB deployed with that JNDI name?
Can you show me your weblogic-ejb-jar.xml?
-- Rob
Arun wrote:
Hi,
Do we have a solution for this problem? I am encountering this problem with an
Applciation Lifecycle Listener. I have deployed this Listener with my EAR file
and it accesses a local ejb (stateful) in its postStart() method. The JNDI look
up is causing a LinkException (root exception is NameNotFoundException)
I am not at my work PC but the application was something like this.
"weblogic-application.xml" had something like.
<listener>
<listener-class>MyListener</listener-class>
<listener-uri>mylistener.jar</listener-uri>
</listener>
where mylistener.jar was placed at the root of the EAR file.
MyListener.java was something like,
import weblogic.application.ApplicationLifecycleListener;
import weblogic.application.ApplicationLifecycleEvent;
import mypackage.mylocalhome;
import mypackage.mylocal;
import javax.naming.*;
public class MyListener extends ApplicationLifecycleListener {
public void preStart(ApplicationLifecycleEvent evt) {
System.out.println
("MyListener(preStart) -- we should always see you..");
} // preStart
public void postStart(ApplicationLifecycleEvent evt) {
try {
System.out.println
("MyListener(postStart) -- we should always see you..");
Context ctx = new InitialContext();
mylocalhome localhome = (mylocalhome)ctx.lookup("MYLOCALJNDINAME");
mylocal localobj = localhome.create();
} catch (Exception e) {
e.printStackTrace();
} // postStart
public void preStop(ApplicationLifecycleEvent evt) {
System.out.println
("MyListener(preStop) -- we should always see you..");
} // preStop
public void postStop(ApplicationLifecycleEvent evt) {
System.out.println
("MyListener(postStop) -- we should always see you..");
} // postStop
public static void main(String[] args) {
System.out.println
("MyListener(main): in main .. we should never see you..");
} // main
Any help is greatly appreciated.
Thanks,
Arun
Rob Woollen <[email protected]> wrote:
We'll need some more info. Can you show me your weblogic-ejb-jar.xml,
the code you are using to lookup the bean, and the full exception?
-- Rob
Siju Hariharan wrote:
Hi
I have a startup class which needs to access a local entity bean. Itused to work
in weblogic 6.1, i am currently migrating to 8.1 and i get a Link Exception.I
tried to make the startup class as a listener with in the application(EAR), it
still complains.
Since it worked in 6.1 i am sure there should be a way for a startupclass to
access a local EJB, please help, i have seen lot of posting regardingthis issue
in the newsgroup but no clear answer.
Any one who faced this problem before and had it solved please do repsondASAP.
U can mail to me at [email protected]
Thanks
Siju -
Hi,
I get this message when i tried to run the application after i have deployed the EJBs and the application. When i test the EJBs i am also getting that there is a problem in the JNDI name but everything looks fine in the DD and i have checked them twice!! Its really frustrating me as i have finish some work soon.. if you know what i mean. Any help is appreciated , thanks in advance.The message is----------->> javax.naming.LinkException: [Root exception is javax.naming.NameNotFoundException
-
Javax.naming.LinkException JNDI error Help please
Hello All,
I am trying my first bean on Weblogic 7 and can't seem to get the deployment descriptor correct. The home
interface is, ObjectIDLocalHome and the full class name is com.oga.gserve.biz.oid.ObjectIDLocalHome. I am
using the fully qualified class name so that I can do an EJBHomeFactory latter on.
I have used the WLS console and see my bean in the JNDI tree I also used the following to find it:
public static void loop(final Context ctx, final String name) throws Exception {
try {
String local;
NamingEnumeration childrenOfNaming = ctx.list(name);
while (childrenOfNaming.hasMore()) {
NameClassPair ncPair = (NameClassPair) childrenOfNaming.next();
System.out.print(ncPair.getName() + " (type ");
System.out.println(ncPair.getClassName() + ")");
if (name.length() > 0) {
local = name + "." + ncPair.getName();
} else {
local = ncPair.getName();
loop(ctx, local);
} catch (javax.naming.CannotProceedException e) {
// We are at a leaf, no more children.
I find ObjectIDLocalHome as type javax.naming.LinkRef, as a leaf of com.oga.gserve.biz.oid
So I know it exist!
But why as a javax.naming.LinkRef?
Now when I try the following:
String cName = ObjectIDLocalHome.class.getName();
ObjectIDLocalHome home = (ObjectIDLocalHome) ctx.lookup(cName);
I get:
javax.naming.LinkException: . Root exception is javax.naming.NameNotFoundException: Unable to resolve
'java:app.ejb/gs-ejbs.jar#ObjectID/local-home' Resolved: '' Unresolved:'java:app' ; remaining name
'java:app.ejb/gs-ejbs.jar#ObjectID/local-home'
What is wrong?
It must be in one of the .xmls but I can't see it:
weblogic-ejb-jar.xml
<?xml version = '1.0'?>
<!DOCTYPE weblogic-ejb-jar PUBLIC
'-//BEA Systems, Inc.//DTD WebLogic 7.0.0 EJB//EN'
'http://www.bea.com/servers/wls700/dtd/weblogic-ejb-jar.dtd'>
<weblogic-ejb-jar>
<weblogic-enterprise-bean>
<ejb-name>ObjectID</ejb-name>
<entity-descriptor>
<pool>
</pool>
<entity-cache>
<cache-between-transactions>False</cache-between-transactions>
</entity-cache>
<persistence>
<persistence-use>
<type-identifier>WebLogic_CMP_RDBMS</type-identifier>
<type-version>7.0</type-version>
<type-storage>META-INF/weblogic-cmp-rdbms-jar.xml</type-storage>
</persistence-use>
</persistence>
<entity-clustering>
</entity-clustering>
</entity-descriptor>
<transaction-descriptor>
</transaction-descriptor>
<enable-call-by-reference>True</enable-call-by-reference>
<local-jndi-name>com.oga.gserve.biz.oid.ObjectIDLocalHome</local-jndi-name>
</weblogic-enterprise-bean>
<weblogic-enterprise-bean>
<ejb-name>OIDServer</ejb-name>
<stateless-session-descriptor>
<pool>
<max-beans-in-free-pool>100</max-beans-in-free-pool>
<initial-beans-in-free-pool>1</initial-beans-in-free-pool>
</pool>
<stateless-clustering>
</stateless-clustering>
</stateless-session-descriptor>
<transaction-descriptor>
</transaction-descriptor>
<reference-descriptor>
<ejb-local-reference-description>
<ejb-ref-name>ejb/ObjectIDLocalHome</ejb-ref-name>
<jndi-name>com.oga.gserve.biz.oid.ObjectIDLocalHome</jndi-name>
</ejb-local-reference-description>
</reference-descriptor>
<local-jndi-name>com.oga.gserve.biz.oid.OIDServerLocalHome</local-jndi-name>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>
ejb-jar.xml
<?xml version = '1.0'?>
<!DOCTYPE ejb-jar PUBLIC
'-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN'
'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
<ejb-jar>
<display-name>OIDRecord</display-name>
<enterprise-beans>
<session>
<description><Session Bean ( Stateless )></description>
<display-name>OIDServer</display-name>
<ejb-name>OIDServer</ejb-name>
<local-home>com.oga.gserve.biz.oid.OIDServerLocalHome</local-home>
<local>com.oga.gserve.biz.oid.OIDServerLocal</local>
<ejb-class>com.oga.gserve.biz.oid.OIDServerBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
<ejb-local-ref>
<description><The Entity Bean we get our ID cahce from.></description>
<ejb-ref-name>ejb/ObjectIDLocalHome</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<local-home>com.oga.gserve.biz.oid.ObjectIDLocalHome</local-home>
<local>com.oga.gserve.biz.oid.ObjectIDLocal</local>
</ejb-local-ref>
</session>
<entity>
<description><Entity Bean ( CMP )></description>
<display-name>ObjectID</display-name>
<ejb-name>ObjectID</ejb-name>
<local-home>com.oga.gserve.biz.oid.ObjectIDLocalHome</local-home>
<local>com.oga.gserve.biz.oid.ObjectIDLocal</local>
<ejb-class>com.oga.gserve.biz.oid.ObjectIDBean</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>java.lang.Integer</prim-key-class>
<reentrant>False</reentrant>
<cmp-version>2.x</cmp-version>
<abstract-schema-name>ObjectIDBean</abstract-schema-name>
<cmp-field>
<field-name>id</field-name>
</cmp-field>
<cmp-field>
<field-name>blockSize</field-name>
</cmp-field>
<cmp-field>
<field-name>nextId</field-name>
</cmp-field>
<cmp-field>
<field-name>name</field-name>
</cmp-field>
<primkey-field>id</primkey-field>
<query>
<query-method>
<method-name>findAll</method-name>
<method-params>
</method-params>
</query-method>
<ejb-ql><![CDATA[SELECT OBJECT(o) FROM ObjectIDBean AS o]]></ejb-ql>
</query>
<query>
<query-method>
<method-name>findByName</method-name>
<method-params>
<method-param>java.lang.String</method-param>
</method-params>
</query-method>
<ejb-ql><![CDATA[SELECT OBJECT(o) FROM ObjectIDBean o WHERE o.name = ?1]]></ejb-ql>
</query>
</entity>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>OIDServer</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
<container-transaction>
<method>
<ejb-name>ObjectID</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
Thank you for any help,
BradHello All,
I am trying my first bean on Weblogic 7 and can't seem to get the deployment descriptor correct. The home
interface is, ObjectIDLocalHome and the full class name is com.oga.gserve.biz.oid.ObjectIDLocalHome. I am
using the fully qualified class name so that I can do an EJBHomeFactory latter on.
I have used the WLS console and see my bean in the JNDI tree I also used the following to find it:
public static void loop(final Context ctx, final String name) throws Exception {
try {
String local;
NamingEnumeration childrenOfNaming = ctx.list(name);
while (childrenOfNaming.hasMore()) {
NameClassPair ncPair = (NameClassPair) childrenOfNaming.next();
System.out.print(ncPair.getName() + " (type ");
System.out.println(ncPair.getClassName() + ")");
if (name.length() > 0) {
local = name + "." + ncPair.getName();
} else {
local = ncPair.getName();
loop(ctx, local);
} catch (javax.naming.CannotProceedException e) {
// We are at a leaf, no more children.
I find ObjectIDLocalHome as type javax.naming.LinkRef, as a leaf of com.oga.gserve.biz.oid
So I know it exist!
But why as a javax.naming.LinkRef?
Now when I try the following:
String cName = ObjectIDLocalHome.class.getName();
ObjectIDLocalHome home = (ObjectIDLocalHome) ctx.lookup(cName);
I get:
javax.naming.LinkException: . Root exception is javax.naming.NameNotFoundException: Unable to resolve
'java:app.ejb/gs-ejbs.jar#ObjectID/local-home' Resolved: '' Unresolved:'java:app' ; remaining name
'java:app.ejb/gs-ejbs.jar#ObjectID/local-home'
What is wrong?
It must be in one of the .xmls but I can't see it:
weblogic-ejb-jar.xml
<?xml version = '1.0'?>
<!DOCTYPE weblogic-ejb-jar PUBLIC
'-//BEA Systems, Inc.//DTD WebLogic 7.0.0 EJB//EN'
'http://www.bea.com/servers/wls700/dtd/weblogic-ejb-jar.dtd'>
<weblogic-ejb-jar>
<weblogic-enterprise-bean>
<ejb-name>ObjectID</ejb-name>
<entity-descriptor>
<pool>
</pool>
<entity-cache>
<cache-between-transactions>False</cache-between-transactions>
</entity-cache>
<persistence>
<persistence-use>
<type-identifier>WebLogic_CMP_RDBMS</type-identifier>
<type-version>7.0</type-version>
<type-storage>META-INF/weblogic-cmp-rdbms-jar.xml</type-storage>
</persistence-use>
</persistence>
<entity-clustering>
</entity-clustering>
</entity-descriptor>
<transaction-descriptor>
</transaction-descriptor>
<enable-call-by-reference>True</enable-call-by-reference>
<local-jndi-name>com.oga.gserve.biz.oid.ObjectIDLocalHome</local-jndi-name>
</weblogic-enterprise-bean>
<weblogic-enterprise-bean>
<ejb-name>OIDServer</ejb-name>
<stateless-session-descriptor>
<pool>
<max-beans-in-free-pool>100</max-beans-in-free-pool>
<initial-beans-in-free-pool>1</initial-beans-in-free-pool>
</pool>
<stateless-clustering>
</stateless-clustering>
</stateless-session-descriptor>
<transaction-descriptor>
</transaction-descriptor>
<reference-descriptor>
<ejb-local-reference-description>
<ejb-ref-name>ejb/ObjectIDLocalHome</ejb-ref-name>
<jndi-name>com.oga.gserve.biz.oid.ObjectIDLocalHome</jndi-name>
</ejb-local-reference-description>
</reference-descriptor>
<local-jndi-name>com.oga.gserve.biz.oid.OIDServerLocalHome</local-jndi-name>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>
ejb-jar.xml
<?xml version = '1.0'?>
<!DOCTYPE ejb-jar PUBLIC
'-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN'
'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
<ejb-jar>
<display-name>OIDRecord</display-name>
<enterprise-beans>
<session>
<description><Session Bean ( Stateless )></description>
<display-name>OIDServer</display-name>
<ejb-name>OIDServer</ejb-name>
<local-home>com.oga.gserve.biz.oid.OIDServerLocalHome</local-home>
<local>com.oga.gserve.biz.oid.OIDServerLocal</local>
<ejb-class>com.oga.gserve.biz.oid.OIDServerBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
<ejb-local-ref>
<description><The Entity Bean we get our ID cahce from.></description>
<ejb-ref-name>ejb/ObjectIDLocalHome</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<local-home>com.oga.gserve.biz.oid.ObjectIDLocalHome</local-home>
<local>com.oga.gserve.biz.oid.ObjectIDLocal</local>
</ejb-local-ref>
</session>
<entity>
<description><Entity Bean ( CMP )></description>
<display-name>ObjectID</display-name>
<ejb-name>ObjectID</ejb-name>
<local-home>com.oga.gserve.biz.oid.ObjectIDLocalHome</local-home>
<local>com.oga.gserve.biz.oid.ObjectIDLocal</local>
<ejb-class>com.oga.gserve.biz.oid.ObjectIDBean</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>java.lang.Integer</prim-key-class>
<reentrant>False</reentrant>
<cmp-version>2.x</cmp-version>
<abstract-schema-name>ObjectIDBean</abstract-schema-name>
<cmp-field>
<field-name>id</field-name>
</cmp-field>
<cmp-field>
<field-name>blockSize</field-name>
</cmp-field>
<cmp-field>
<field-name>nextId</field-name>
</cmp-field>
<cmp-field>
<field-name>name</field-name>
</cmp-field>
<primkey-field>id</primkey-field>
<query>
<query-method>
<method-name>findAll</method-name>
<method-params>
</method-params>
</query-method>
<ejb-ql><![CDATA[SELECT OBJECT(o) FROM ObjectIDBean AS o]]></ejb-ql>
</query>
<query>
<query-method>
<method-name>findByName</method-name>
<method-params>
<method-param>java.lang.String</method-param>
</method-params>
</query-method>
<ejb-ql><![CDATA[SELECT OBJECT(o) FROM ObjectIDBean o WHERE o.name = ?1]]></ejb-ql>
</query>
</entity>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>OIDServer</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
<container-transaction>
<method>
<ejb-name>ObjectID</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
Thank you for any help,
Brad -
Javax.naming.LinkException Please Help
Hello All,
I am trying my first bean on Weblogic 7 and can't seem to get the deployment descriptor correct. The home
interface is, ObjectIDLocalHome and the full class name is com.oga.gserve.biz.oid.ObjectIDLocalHome. I am
using the fully qualified class name so that I can do an EJBHomeFactory latter on.
I have used the WLS console and see my bean in the JNDI tree I also used the following to find it:
public static void loop(final Context ctx, final String name) throws Exception {
try {
String local;
NamingEnumeration childrenOfNaming = ctx.list(name);
while (childrenOfNaming.hasMore()) {
NameClassPair ncPair = (NameClassPair) childrenOfNaming.next();
System.out.print(ncPair.getName() + " (type ");
System.out.println(ncPair.getClassName() + ")");
if (name.length() > 0) {
local = name + "." + ncPair.getName();
} else {
local = ncPair.getName();
loop(ctx, local);
} catch (javax.naming.CannotProceedException e) {
// We are at a leaf, no more children.
I find ObjectIDLocalHome as type javax.naming.LinkRef, as a leaf of com.oga.gserve.biz.oid
So I know it exist!
But why as a javax.naming.LinkRef?
Now when I try the following:
String cName = ObjectIDLocalHome.class.getName();
ObjectIDLocalHome home = (ObjectIDLocalHome) ctx.lookup(cName);
I get:
javax.naming.LinkException: . Root exception is javax.naming.NameNotFoundException: Unable to
resolve 'java:app.ejb/gs-ejbs.jar#ObjectID/local-home' Resolved: '' Unresolved:'java:app' ; remaining
name 'java:app.ejb/gs-ejbs.jar#ObjectID/local-home'
What is wrong?
It must be in one of the .xmls but I can't see it:
weblogic-ejb-jar.xml
<?xml version = '1.0'?>
<!DOCTYPE weblogic-ejb-jar PUBLIC
'-//BEA Systems, Inc.//DTD WebLogic 7.0.0 EJB//EN'
'http://www.bea.com/servers/wls700/dtd/weblogic-ejb-jar.dtd'>
<weblogic-ejb-jar>
<weblogic-enterprise-bean>
<ejb-name>ObjectID</ejb-name>
<entity-descriptor>
<pool>
</pool>
<entity-cache>
<cache-between-transactions>False</cache-between-transactions>
</entity-cache>
<persistence>
<persistence-use>
<type-identifier>WebLogic_CMP_RDBMS</type-identifier>
<type-version>7.0</type-version>
<type-storage>META-INF/weblogic-cmp-rdbms-jar.xml</type-storage>
</persistence-use>
</persistence>
<entity-clustering>
</entity-clustering>
</entity-descriptor>
<transaction-descriptor>
</transaction-descriptor>
<enable-call-by-reference>True</enable-call-by-reference>
<local-jndi-name>com.oga.gserve.biz.oid.ObjectIDLocalHome</local-jndi-name>
</weblogic-enterprise-bean>
<weblogic-enterprise-bean>
<ejb-name>OIDServer</ejb-name>
<stateless-session-descriptor>
<pool>
<max-beans-in-free-pool>100</max-beans-in-free-pool>
<initial-beans-in-free-pool>1</initial-beans-in-free-pool>
</pool>
<stateless-clustering>
</stateless-clustering>
</stateless-session-descriptor>
<transaction-descriptor>
</transaction-descriptor>
<reference-descriptor>
<ejb-local-reference-description>
<ejb-ref-name>ejb/ObjectIDLocalHome</ejb-ref-name>
<jndi-name>com.oga.gserve.biz.oid.ObjectIDLocalHome</jndi-name>
</ejb-local-reference-description>
</reference-descriptor>
<local-jndi-name>com.oga.gserve.biz.oid.OIDServerLocalHome</local-jndi-name>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>
ejb-jar.xml
<?xml version = '1.0'?>
<!DOCTYPE ejb-jar PUBLIC
'-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN'
'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
<ejb-jar>
<display-name>OIDRecord</display-name>
<enterprise-beans>
<session>
<description><Session Bean ( Stateless )></description>
<display-name>OIDServer</display-name>
<ejb-name>OIDServer</ejb-name>
<local-home>com.oga.gserve.biz.oid.OIDServerLocalHome</local-home>
<local>com.oga.gserve.biz.oid.OIDServerLocal</local>
<ejb-class>com.oga.gserve.biz.oid.OIDServerBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
<ejb-local-ref>
<description><The Entity Bean we get our ID cahce from.></description>
<ejb-ref-name>ejb/ObjectIDLocalHome</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<local-home>com.oga.gserve.biz.oid.ObjectIDLocalHome</local-home>
<local>com.oga.gserve.biz.oid.ObjectIDLocal</local>
</ejb-local-ref>
</session>
<entity>
<description><Entity Bean ( CMP )></description>
<display-name>ObjectID</display-name>
<ejb-name>ObjectID</ejb-name>
<local-home>com.oga.gserve.biz.oid.ObjectIDLocalHome</local-home>
<local>com.oga.gserve.biz.oid.ObjectIDLocal</local>
<ejb-class>com.oga.gserve.biz.oid.ObjectIDBean</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>java.lang.Integer</prim-key-class>
<reentrant>False</reentrant>
<cmp-version>2.x</cmp-version>
<abstract-schema-name>ObjectIDBean</abstract-schema-name>
<cmp-field>
<field-name>id</field-name>
</cmp-field>
<cmp-field>
<field-name>blockSize</field-name>
</cmp-field>
<cmp-field>
<field-name>nextId</field-name>
</cmp-field>
<cmp-field>
<field-name>name</field-name>
</cmp-field>
<primkey-field>id</primkey-field>
<query>
<query-method>
<method-name>findAll</method-name>
<method-params>
</method-params>
</query-method>
<ejb-ql><![CDATA[SELECT OBJECT(o) FROM ObjectIDBean AS o]]></ejb-ql>
</query>
<query>
<query-method>
<method-name>findByName</method-name>
<method-params>
<method-param>java.lang.String</method-param>
</method-params>
</query-method>
<ejb-ql><![CDATA[SELECT OBJECT(o) FROM ObjectIDBean o WHERE o.name =
?1]]></ejb-ql>
</query>
</entity>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>OIDServer</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
<container-transaction>
<method>
<ejb-name>ObjectID</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
Thank you for any help,
Bradyou must pack all .java into one package ,even the client,
then you can use it normally.
<Brad@NoWhere> wrote in message news:[email protected]...
Hello All,
I am trying my first bean on Weblogic 7 and can't seem to get thedeployment descriptor correct. The home
interface is, ObjectIDLocalHome and the full class name iscom.oga.gserve.biz.oid.ObjectIDLocalHome. I am
using the fully qualified class name so that I can do an EJBHomeFactorylatter on.
>
I have used the WLS console and see my bean in the JNDI tree I also usedthe following to find it:
>
public static void loop(final Context ctx, final String name) throwsException {
>
try {
String local;
NamingEnumeration childrenOfNaming = ctx.list(name);
while (childrenOfNaming.hasMore()) {
NameClassPair ncPair = (NameClassPair)childrenOfNaming.next();
System.out.print(ncPair.getName() + " (type ");
System.out.println(ncPair.getClassName() + ")");
if (name.length() > 0) {
local = name + "." + ncPair.getName();
} else {
local = ncPair.getName();
loop(ctx, local);
} catch (javax.naming.CannotProceedException e) {
// We are at a leaf, no more children.
I find ObjectIDLocalHome as type javax.naming.LinkRef, as a leaf ofcom.oga.gserve.biz.oid
So I know it exist!
But why as a javax.naming.LinkRef?
Now when I try the following:
String cName = ObjectIDLocalHome.class.getName();
ObjectIDLocalHome home = (ObjectIDLocalHome) ctx.lookup(cName);
I get:
javax.naming.LinkException: . Root exception isjavax.naming.NameNotFoundException: Unable to
resolve 'java:app.ejb/gs-ejbs.jar#ObjectID/local-home' Resolved: ''Unresolved:'java:app' ; remaining
name 'java:app.ejb/gs-ejbs.jar#ObjectID/local-home'
What is wrong?
It must be in one of the .xmls but I can't see it:
weblogic-ejb-jar.xml
<?xml version = '1.0'?>
<!DOCTYPE weblogic-ejb-jar PUBLIC
'-//BEA Systems, Inc.//DTD WebLogic 7.0.0 EJB//EN'
'http://www.bea.com/servers/wls700/dtd/weblogic-ejb-jar.dtd'>
<weblogic-ejb-jar>
<weblogic-enterprise-bean>
<ejb-name>ObjectID</ejb-name>
<entity-descriptor>
<pool>
</pool>
<entity-cache>
<cache-between-transactions>False</cache-between-transactions>
</entity-cache>
<persistence>
<persistence-use>
<type-identifier>WebLogic_CMP_RDBMS</type-identifier>
<type-version>7.0</type-version>
<type-storage>META-INF/weblogic-cmp-rdbms-jar.xml</type-storage>
</persistence-use>
</persistence>
<entity-clustering>
</entity-clustering>
</entity-descriptor>
<transaction-descriptor>
</transaction-descriptor>
<enable-call-by-reference>True</enable-call-by-reference>
<local-jndi-name>com.oga.gserve.biz.oid.ObjectIDLocalHome</local-jndi-name>
</weblogic-enterprise-bean>
<weblogic-enterprise-bean>
<ejb-name>OIDServer</ejb-name>
<stateless-session-descriptor>
<pool>
<max-beans-in-free-pool>100</max-beans-in-free-pool>
<initial-beans-in-free-pool>1</initial-beans-in-free-pool>
</pool>
<stateless-clustering>
</stateless-clustering>
</stateless-session-descriptor>
<transaction-descriptor>
</transaction-descriptor>
<reference-descriptor>
<ejb-local-reference-description>
<ejb-ref-name>ejb/ObjectIDLocalHome</ejb-ref-name>
<jndi-name>com.oga.gserve.biz.oid.ObjectIDLocalHome</jndi-name>
</ejb-local-reference-description>
</reference-descriptor>
<local-jndi-name>com.oga.gserve.biz.oid.OIDServerLocalHome</local-jndi-name>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>
ejb-jar.xml
<?xml version = '1.0'?>
<!DOCTYPE ejb-jar PUBLIC
'-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN'
'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
<ejb-jar>
<display-name>OIDRecord</display-name>
<enterprise-beans>
<session>
<description><Session Bean ( Stateless )></description>
<display-name>OIDServer</display-name>
<ejb-name>OIDServer</ejb-name>
<local-home>com.oga.gserve.biz.oid.OIDServerLocalHome</local-home>
<local>com.oga.gserve.biz.oid.OIDServerLocal</local>
<ejb-class>com.oga.gserve.biz.oid.OIDServerBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
<ejb-local-ref>
<description><The Entity Bean we get our ID cahcefrom.></description>
<ejb-ref-name>ejb/ObjectIDLocalHome</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<local-home>com.oga.gserve.biz.oid.ObjectIDLocalHome</local-home>
<local>com.oga.gserve.biz.oid.ObjectIDLocal</local>
</ejb-local-ref>
</session>
<entity>
<description><Entity Bean ( CMP )></description>
<display-name>ObjectID</display-name>
<ejb-name>ObjectID</ejb-name>
<local-home>com.oga.gserve.biz.oid.ObjectIDLocalHome</local-home>
<local>com.oga.gserve.biz.oid.ObjectIDLocal</local>
<ejb-class>com.oga.gserve.biz.oid.ObjectIDBean</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>java.lang.Integer</prim-key-class>
<reentrant>False</reentrant>
<cmp-version>2.x</cmp-version>
<abstract-schema-name>ObjectIDBean</abstract-schema-name>
<cmp-field>
<field-name>id</field-name>
</cmp-field>
<cmp-field>
<field-name>blockSize</field-name>
</cmp-field>
<cmp-field>
<field-name>nextId</field-name>
</cmp-field>
<cmp-field>
<field-name>name</field-name>
</cmp-field>
<primkey-field>id</primkey-field>
<query>
<query-method>
<method-name>findAll</method-name>
<method-params>
</method-params>
</query-method>
<ejb-ql><![CDATA[SELECT OBJECT(o) FROM ObjectIDBean AS
o]></ejb-ql>
</query>
<query>
<query-method>
<method-name>findByName</method-name>
<method-params>
<method-param>java.lang.String</method-param>
</method-params>
</query-method>
<ejb-ql><![CDATA[SELECT OBJECT(o) FROM ObjectIDBean o WHERE o.name
=> ?1]></ejb-ql>
</query>
</entity>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>OIDServer</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
<container-transaction>
<method>
<ejb-name>ObjectID</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
Thank you for any help,
Brad -
Get back Shared Workspace Pages and Sample content folder
Hi,
We deleted Shared Workspace pages and Sample content folder in Workspace, due to client's insistence. Now they want it back, as they liked the earlier view better.
Is there a way to get these folders back? Any help will be appreciated.Did you delete them delete them or simply remove them from the user preferences
To figure that out go to Explore and then select View from your drop down and select "Show hidden"
You should see a folder called "Shared Workspace Pages". If you see it and Inside you have Homepage then you haven't truely nuked it and add it back through preferences.
If you totally nuked it. Then someone else might have the trick for adding it back but if you have a server I would nose around in (for 11.1.1.3 and different depending on which version you are using) to see if you can see the files in question.
/opt/hyperion/deployments/WebLogic9/servers/Workspace/webapps/workspace_webservices/workspace/conf/ -
Weblogic9.2 Opensso Access Manager 7.5
Hi,
I configured the Access Manager in weblogic9.2. I downloaded the Agent from Sun for weblogic 9.2. Then I deployed the sampleApplication that comes with the agent and configured users, role etc according to the Readme.txt.
I am always getting Invalid Session ID exception. I read java.net docs and sun's forums and tried to configure accordingly, but with no luck.
I am using the default Flat File store that Access Manager has.
I have been trying to see if there is any docs that show step by step process of how to attach User to role, URL Policy to Role/ groups/ varous authentication mechanisms.
Please let me know if the OpenSSO is tested on Weblogic 9.2 and whether anything special I might have to do to make it work.
Thank you302 is a redirect. Probably citrix is trying to access a URL on itself and is getting the redirect instead of the content it expects. Analyze the PA and web server logs and see what requests it is making. Add those URL's to the PA's not enforced list
-
Problem occured while starting the Manged server of weblogic9.2
Hi all,
I am cnfiguring the OWSM on 2 machine which are in Clustering mode(Pre-Prod Env)
I have done the installation of SOA SUITE10.1.3.1 for the same.
After installation , i started Admin server.
But i am facing issue while starting the managed server of weblogic9.2 through admin Server Console.(which are clustered).The managed Server state goes to ADMIN and raise the error that failed to start the server.It does not go into RUNNING state.
The error i was recieved is :
*####<May 13, 2009 10:21:01 AM IST> <Info> <ServletContext-/bea_wls_internal> <ggneai65> <AdminServer> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <> <1242190261158> <000000> <HTTPClntLogin: Login rejected with code: 'Failed', reason: java.net.ProtocolException: HTTP tunneling is disabled*
* at weblogic.rjvm.http.HTTPServerJVMConnection.acceptJVMConnection(HTTPServerJVMConnection.java:88)*
* at weblogic.rjvm.http.TunnelLoginServlet.service(TunnelLoginServlet.java:80)*
* at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)*
* at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)*
* at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)*
* at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)*
* at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)*
* at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3244)*
* at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)*
* at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)*
* at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2010)*
* at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1916)*
* at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1366)*
* at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)*
* at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)*
*'>*
because of which deployment of OWSM failed at managed server.
please help me for the same ASAP.
its urgent.
Regards
GauravThat is an INFO message you received and would not stop a managed server from starting. To get rid of that INFO message, enable tunneling on the admin server.
Check your node manager log file to see why the managed server is not starting. -
Error in ear deployment weblogic9.2
Hi..
When i try to deploy an ear in weblogic9.2 im repeatedly getting these 2 error messages -
1)Unable to access the selected application
2)No name parameter specified
the steps i followed are
i selected the install option in deployments menu and i selected the ear file and clicked on next.
i get these error messages here.
i dont get any error message when deploying in weblogic8.1.
kindly help me out in this
ArunYes i have used :
import com.sap.aii.af.mp.module.Module;
import com.sap.aii.af.mp.module.ModuleContext;
import com.sap.aii.af.mp.module.ModuleData;
import com.sap.aii.af.mp.module.ModuleException;
also in the build Build path; i have the "aii_af_mp.jar". Though in EAR i have removed all added jar file except the one jar file which is not provided by SAP. As mentioned in Adapter module dev guide.
Do you think adding that jar file could solve the issue.
Thanks
Ankur -
Javax.naming.LinkException: Help please
Hi all,
I hope one of you can help figure this out.
I am useing WLS 7 on Win2K.
When I try this:
home = (ObjectIDLocalHome) ctx.lookup("ObjectIDLocalHome");
I get this:
javax.naming.LinkException: . Root exception is javax.naming.NameNotFoundException: Unable to resolve 'java:app.ejb/gs-ejbs.jar#ObjectID/local-home' Resolved: ''
Unresolved:'java:app' ; remaining name 'java:app.ejb/gs-ejbs.jar#ObjectID/local-home'
My weblogic-ejb-jar.xml has:
<weblogic-enterprise-bean>
<ejb-name>ObjectID</ejb-name>
<entity-descriptor>
<entity-cache>
<cache-between-transactions>False</cache-between-transactions>
</entity-cache>
<persistence>
<persistence-use>
<type-identifier>WebLogic_CMP_RDBMS</type-identifier>
<type-version>7.0</type-version>
<type-storage>META-INF/weblogic-cmp-rdbms-jar.xml</type-storage>
</persistence-use>
</persistence>
</entity-descriptor>
<local-jndi-name>ObjectIDLocalHome</local-jndi-name>
</weblogic-enterprise-bean>
And my ejb-jar.xml has:
<entity>
<description>Entity Bean ( CMP )</description>
<display-name>ObjectID</display-name>
<ejb-name>ObjectID</ejb-name>
<local-home>com.oga.gserve.biz.oid.ObjectIDLocalHome</local-home>
<local>com.oga.gserve.biz.oid.ObjectIDLocal</local>
<ejb-class>com.oga.gserve.biz.oid.ObjectIDBean</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>java.lang.Integer</prim-key-class>
<reentrant>False</reentrant>
<cmp-version>2.x</cmp-version>
<abstract-schema-name>ObjectIDBean</abstract-schema-name>
And yes the EJB lives in gs-ejbs.jar
When I goto the WLS console and look at the JNDI Tree I see ObjectIDLocalHome under javax.
I hope this is just something stupid that I have over looked. HELP please.
BradHi Guys,
Please help me with the solution if any one got it by now ??
Malay
>
Shan, have you found a solution? I'm interested in
knowing since the same error
is happening at my end!
Thanks!
"Shan" <[email protected]> wrote:
I am facing the same problem too. Please someonesolve it.
Thanks.
~Shan
"George Job" <[email protected]> wrote:
I too am facing the same problem. Does anyone have
a solution to this
problem.
please help.
"zollen" <[email protected]> wrote:
I am having the same problem. I even packaged the
ejbs and jps files
into a web
application archive file. It does not seems tosolve the problem. Would
you mind
sharing your solution??
Brad@NoWhere wrote:
Hi all,
I hope one of you can help figure this out.
I am useing WLS 7 on Win2K.
When I try this:
home = (ObjectIDLocalHome)
ctx.lookup("ObjectIDLocalHome");
I get this:
javax.naming.LinkException: . Root exception isjavax.naming.NameNotFoundException:
Unable to resolve'java:app.ejb/gs-ejbs.jar#ObjectID/local-home'
Resolved:
Unresolved:'java:app' ; remaining name'java:app.ejb/gs-ejbs.jar#ObjectID/local-home'
My weblogic-ejb-jar.xml has:
<weblogic-enterprise-bean>
<ejb-name>ObjectID</ejb-name>
<entity-descriptor>
<entity-cache>
<cache-between-transactions>False</cache-between-tran
sactions>
</entity-cache>
<persistence>
<persistence-use>
<type-identifier>WebLogic_CMP_RDBMS</type-identifier>
<type-version>7.0</type-version>
<type-storage>META-INF/weblogic-cmp-rdbms-jar.xml</ty
pe-storage>
</persistence-use>
</persistence>
</entity-descriptor>
<local-jndi-name>ObjectIDLocalHome</local-jndi-name>
</weblogic-enterprise-bean>
And my ejb-jar.xml has:
<entity>
<description>Entity Bean ( CMP)</description>
<display-name>ObjectID</display-name>
<ejb-name>ObjectID</ejb-name>
<local-home>com.oga.gserve.biz.oid.ObjectIDLocalHome<
/local-home>
><local>com.oga.gserve.biz.oid.ObjectIDLocal</local>
><ejb-class>com.oga.gserve.biz.oid.ObjectIDBean</ejb-c
lass>
><persistence-type>Container</persistence-type>
><prim-key-class>java.lang.Integer</prim-key-class>
<reentrant>False</reentrant>
<cmp-version>2.x</cmp-version>
<abstract-schema-name>ObjectIDBean</abstract-schema-n
ame>
And yes the EJB lives in gs-ejbs.jar
When I goto the WLS console and look at the JNDITree I see ObjectIDLocalHome
under javax.
I hope this is just something stupid that I haveover looked. HELP
please.
Brad -
Configure a Bridge between Websphere MQ 6.0(MQSeries) and Weblogic9.2
Bridge between Websphere MQ 6.0(Previously MQSeries) and Weblogic 9.2
At Websphere MQ 6.0 side:
³ Create a folder by the name JNDI-Directory under C drive
³ Create the queue manager by using the command at the command prompt:
crtmqm testqmgr or you can create it by GUI also.
³ Start the queue manager: strmqm testqmgr. or you can start it by GUI also
³Define Local Queues in the newly created queue manager testqmgr by using GUI or by using Commands .Assume we have created a local queue by the name MyMDBQueue.
³ Create a file by the name MyAdmin.config,It¡¦s a configuration file under C:\Program Files\IBM\WebSphere MQ\Java\bin directory.
Now add the following entries into the config file
INITIAL_CONTEXT_FACTORY=com.sun.jndi.fscontext.RefFSContextFactory
PROVIDER_URL=file:/C:/JNDI-Directory
SECURITY_AUTHENTICATION=none
Without the above step also you can do that. How it means
You have a file called JMSAdmin.config under C:\Program Files\IBM\WebSphere MQ\Java\bin directory.jsut uncomment the above mentioned 3 properties and comment the remaing that¡¦s it.
Next run the below command
C:\Program Files\IBM\WebSphere MQ\Java\bin>JMSAdmin.bat ¡Vcfg MyAdmin.config
Once you run the above command you will see
this prompt InitCtx>.
Now your command prompt will stop at
InitCtx>
Just type the following commands
a) InitCtx> def xaqcf(SenderQCF) qmgr(testqmgr) press enter
b) InitCtx> def q(MyMDBQueue) qmgr(testqmgr) queue(MyMDBQueue) press enter
c) InitCtx> end press enter
At step a it will create a queue connection factory by the name SenderQCF UNDER QueueManager testqmgr
At step b it will create a queue by the name MyMDBQueue UNDER
QueueManager testqmgr
At step c Its ends the Context cration process
At Weblogic 9.2 side:
Go to your domain location lib folder i.e. In my system it¡¦s in C:\bea\user_projects\domains\bplus_domain\lib. Add the following jars in lib folder
1) com.ibm.mq.jar
2) com.ibm.mqjms.jar
3) commonservices.jar
4) connector.jar
5) dhbcore.jar
6) fscontext.jar
7) jms.jar
8) jta.jar
9) ldap.jar
10) postcard.jar
11) providerutil.jar
Now restart the weblogic server. now the server reads all the jars
Open console of weblogic9
Go to Services³Messaging³Bridges³Jms bridge destination. under this create new
jms bridge destination.
Source of jms bridge destination:
Adapter JNDI Name: eis.jms.WLSConnectionFactofyNoTX
Classpath:<optional>
Connection URL: file:/C:/JNDI-Directory
Initial Context Factory: com.sun.jndi.fscontext.RefFSContextFactory
Connection Factory JNDI Name: SenderQCF
Destination JNDI Name: MyMDBQueue
Destination Type:Queue
User Name: <optional>
User Password: <optional>
Confirm User Password: <optional>
Now activate the changes what you have made
Destination of jms bridge destination:
Adapter JNDI Name: eis.jms.WLSConnectionFactofyNoTX
Classpath: < optional>
Connection URL: t3://localhost:7001
Initial Context Factory: weblogic.jndi.WLInitialContextFactory
Connection Factory JNDI Name: ConnectionFactory1
Destination JNDI Name: ResponseQueue
Destination Type:Queue
User Name: < optional>
User Password: < optional>
Confirm User Password: < optional>
Now configure a new Bridge by using above configured two source and destination
jms bridge destinations
At source you have to select Other JMS.don¡¦t select Weblogic7 or Higher because the source of this bridge is WebsphreMQ, not weblogic
Now once again RESTART The weblogic9.2 serever and put one message on WebsphreMq queue and check whether it reaches the destination queue of weblogic
Enjoy the sessionIs this working for you? What errors do you get in the logs (bam, EL)?
-
Unable send topic to weblogic9.2 over SSL
I try to send topic to weblogic9.2 over SSL from a java application, but always get the error :"Exception in thread "main" java.lang.RuntimeException: Exception occurred while reading the license file". I have placed the license file license.bea
in my application, it didn't work. Any hints?Attach with my test code,
public class TopicSend {
public final static String JNDI_FACTORY = "weblogic.jndi.WLInitialContextFactory";
public static String JMS_FACTORY = "ConnectionFactory";
public static String TOPIC = "TP";
public static String URL;
protected TopicConnectionFactory tconFactory;
protected TopicConnection tcon;
protected TopicSession tsession;
protected TopicPublisher tpublisher;
protected Topic topic;
protected TextMessage msg;
static {
Properties properties = new Properties();
try {
properties.load(new FileInputStream("param.properties"));
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
TopicSend.JMS_FACTORY = properties.getProperty("ConnectionFactory");
TopicSend.TOPIC = properties.getProperty("Topic");
TopicSend.URL = properties.getProperty("URL");
public void init(Context ctx, String topicName) throws NamingException,
JMSException, FileNotFoundException, IOException {
tconFactory = (TopicConnectionFactory) PortableRemoteObject.narrow(ctx
.lookup(JMS_FACTORY), TopicConnectionFactory.class);
tcon = tconFactory.createTopicConnection();
tsession = tcon.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
topic = (Topic) PortableRemoteObject.narrow(ctx.lookup(topicName),
Topic.class);
tpublisher = tsession.createPublisher(topic);
msg = tsession.createTextMessage();
tcon.start();
public void send(String message) throws JMSException {
msg.setText(message);
tpublisher.publish(msg);
public void close() throws JMSException {
tpublisher.close();
tsession.close();
tcon.close();
public static void main(String[] args) throws Exception {
InitialContext ic = getInitialContext(TopicSend.URL);
TopicSend ts = new TopicSend();
ts.init(ic, TOPIC);
readAndSend(ts);
ts.close();
protected static void readAndSend(TopicSend ts) throws IOException,
JMSException {
BufferedReader msgStream = new BufferedReader(new InputStreamReader(
System.in));
String line = null;
System.out
.print("\n\t TopicSender Started �� Enter message (\"quit\" to quit): \n");
do {
System.out.print("Topic Sender Says > ");
line = msgStream.readLine();
if (line != null && line.trim().length() != 0) {
ts.send(line);
} while (line != null && !line.equalsIgnoreCase("quit"));
protected static InitialContext getInitialContext(String url)
throws NamingException {
Hashtable<String, String> env = new Hashtable<String, String>();
env.put(Context.INITIAL_CONTEXT_FACTORY, JNDI_FACTORY);
env.put(Context.PROVIDER_URL, url);
env.put("weblogic.jndi.createIntermediateContexts", "true");
return new InitialContext(env);
}
Maybe you are looking for
-
I just download the CD and am getting "unable to expand "xxxxxxx.zip" into "Music". (Error 2- No such file or directory). I then tried to open it in StuffIt Expander and it say the archive may be damaged. Could you direct me on how to make this work.
-
How can the user export report results to an excel, csv or pdf document. Where can that option be added? Thanks in advance.
-
I have an MBP and just bought a MacBook 2 today. I bouth AppleCare Protection Plans for both and am attempting to register them. I know where to find the serial number, that's not the issue, the issue is that the serial numbers are not being accepted
-
Hello All, Please share your expert ideas how me can do HTTP getRequest() with windows NTLM authentication from OBPM..?? I am not sure even whether its possible or not, if not what could be the alternative way to do integration with MS SharePoint ??
-
Pavilion p6157c freezes at blue hp screen HELP
My desktop freezes at the blue hp screen on startup, any button I press that is shown on the screen (f10, esc, f9, f11) won't register or do anything. I am running windows 7 and have a pavilion p6157c desktop. This is very important to me and if anyo