J2EE client mapping in WL6
I've read the not-so-good dox about running a J2EE client in WL6:
- make a jar packaged with the standard META-INF/application-client.xml
- put an xml called <jarname>.runtime.xml in the dir with the client jar
(for WL6 specific jndi mappings)
- run the jar with weblogic.j2eeclient.Main [jar] urlthis is cumbersome in development. my J2EE client is mostly made of junit
testcases that call entities and session beans. There are dozens of "Main"
classes in the jar, that I might want to run individually!
I would like to run the testcases directly using the compiled classes
directory - but then the jndi mappings between the standard, logical names
like "java:comp/env/ejb/mySessionHome" and the WL-specific names like
"ejb.myapp.mySessionHome" fail.
actually, if I run the client using in code the actual WL6 jndi names, no
deployment info is necessary, but I want to use in code only the logical
names.
so, my question is : how do I run an unpackaged client that picks up the
jndi mappings specified in the .runtime.xml ??
Edo
PS - I basically want to replicate on the client-side the way I work on the
server-side : I use WL6 dynamic deployment of an unpackaged ear : no
explicit calls to jar and ejbc - which helps my code-complie-test cycle a
lot !
Hi Sandy,
If I understand you correctly, then you are asking how to make
a stand-alone java client, right? According to the J2EE spec, a
stand-alone java client also needs to be deployed to a container.
A long time ago (before OC4J, when there was only OrionServer)
I struggled for about a week before finally figuring out how to
do this.
However, I then discovered that, with OrionServer (and therefore
also with OC4J), your stand-alone java client does not have
to be deployed to a container and can be launched from the command
line with the "java" command.
If you do want to deploy your java client, then the only way
I know to launch it is by using the "applicationlauncher.jar"
file. This file was part of the first OC4J (version 1.0.2.2).
It disappeared in the next version (9.0.2) and now has reappeared
in the latest version (9.0.3) -- go figure! Like I said, by the
time I started using OC4J, I was only using non-deployed clients,
so I had no need for "applicationlauncher.jar", so the fact it
was missing from version 9.0.2 didn't affect me.
In any case, I recall information on how to use the "applicationlauncher.jar"
file on the following web sites:
http://www.orionserver.com
http://www.orionsupport.com
http://www.atlassian.com
http://www.elephantwalker.com
I also recall answering similar questions several times previously
on this forum, so a search of the forum archives may also help.
I hope I have correctly interpreted your question and given you
a helpful answer.
Good Luck,
Avi.
Similar Messages
-
J2EE client mapping in WL6 - continued : jms queues and topics
How can one use "generic" (i.e. "java:comp/env/jms/myQueue") names in client
code for jms queues and topics,
since neither application-client.xml nor WL's myjarname.runtime.xml
have elements for them ?
I mean, jms managed objects are not env-entries (application-client.dtd
specifies that only primitive wrapper types can be valid env-entry-value)
nor resources (which I understand are all connection factories, for jdbc,
jms or mail ...).
In my ejb-jar.xml I use the resource-env-ref element :
<resource-env-ref>
<resource-env-ref-name>jms/CreationErrorQueue</resource-env-ref-name>
<resource-env-ref-type>javax.jms.Queue</resource-env-ref-type>
</resource-env-ref>
which can be mapped in weblogic-ejb-jar.xml
<resource-env-description>
<res-env-ref-name>jms/CreationErrorQueue</res-env-ref-name>
<jndi-name>jms.aregon.CreationErrorQueue</jndi-name>
</resource-env-description>
but I don't know how to map the jndi of such objects in a client
application.
EdoHi Sachin --
In the 10.1.3.1 release, a set of new commands have been added to admin_client.jar to support the command line creation of JMS resources:
-addJMSConnectionFactory -domain <domain> -jndiLocation <jndiLocation> [options]
-removeJMSConnectionFactory -jndiLocation <jndiLocation>
-getJMSConnectionFactories
-addDestination -domain <domain> -name <name> -jndiLocation <jndiLocation> [options]
-removeDestination -name <name> [options]
-getDestinations
You can read about it in the doc:
http://download-west.oracle.com/docs/cd/B31017_01/web.1013/b28950/adminclient.htm#CHDDFJJA
cheers
-steve- -
Running a J2EE client on a Remote machine
How do you run a J2EE client application on a remote machine?
and what about running on remote client .
the things i know is , ok leave i am pasting a client which is on different machine (i.e not on the machine on which the server is ) copy
1. the client jar file which is return when u deploy the beans .
* Remember to add jar path in the class path
2. client class / java file on the remote client
and then run the client
for eg . client code
change Properties 's prop accoding to u
import javax.ejb.*;
import javax.naming.*;
import java.rmi.*;
import javax.rmi.PortableRemoteObject;
import java.util.*;
public class TestClient {
public static void main(String[] args) {
try {
System.out.println("IDFactory");
Properties prop = new Properties();
/* prop.put("org.omg.CORBA.ORBInitialHost","192.168.10.5");
prop.put("org.omg.CORBA.ORBInitialPort","1050");
prop.put(Context.PROVIDER_URL, "iiop://192.168.10.5:1050");
prop.put(javax.naming.Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.cosnaming.CNCtxFactory");
InitialContext initial = new InitialContext(prop);
Object objref = initial.lookup("TimeReport/Data/TestHome");
TestHome home = (TestHome)PortableRemoteObject.narrow(objref,TestHome.class);
System.out.println("looking up IDFactory Session Bean");
Test TestRemote = home.create();
System.out.println("IDFactory Created ");
long roleID = TestRemote.getID("TR_ROLE","Role_ID");
System.out.println("RoleID is " + roleID);
TestRemote.remove();
} catch (Exception ex)
System.err.println("Caught an unexpected exception!" + ex.getMessage());
ex.printStackTrace();
if it works then let know on [email protected]
cheers
Deepak Sumani -
Help:How can I run the J2EE Client Application? Thanks
Help:How can I run the J2EE Client Application that will access the remote J2EE1.4 application server which runs on another host computer?
I have developped a stateles senterprise java bean name converter and deloyed it in the j2ee1.4 application server on the host machine A. The converterbean provides the remote home interface and remote interface. At the same time I have developped the j2ee application client named convertappclient. When I access the conveter bean at host computer A through the script 'appclient.bat' as 'appclient -client convertappclient.jar', the client can access the bean sucessfully. Now I want to access the bean through the script 'appclient.bat' at host computer B,what files should I copy from host computer A to host computer B;and what the command line should be like? Thanks!
The following are the code of the enterprise java bean and it's home interface .
The client code is also provided.
The enterprise java bean:
package converter;
import java.rmi.RemoteException;
import javax.ejb.SessionBean;
import javax.ejb.SessionContext;
import java.math.*;
public class ConverterBean implements SessionBean {
BigDecimal yenRate = new BigDecimal("121.6000");
BigDecimal euroRate = new BigDecimal("0.0077");
public ConverterBean() {
public BigDecimal dollarToYen(BigDecimal dollars) {
BigDecimal result = dollars.multiply(yenRate);
return result.setScale(2, BigDecimal.ROUND_UP);
public BigDecimal yenToEuro(BigDecimal yen) {
BigDecimal result = yen.multiply(euroRate);
return result.setScale(2, BigDecimal.ROUND_UP);
public void ejbCreate() {
public void ejbRemove() {
public void ejbActivate() {
public void ejbPassivate() {
public void setSessionContext(SessionContext sc) {
The bean's remote home interface :
package converter;
import java.rmi.RemoteException;
import javax.ejb.CreateException;
import javax.ejb.EJBHome;
public interface ConverterHome extends EJBHome {
Converter create() throws RemoteException, CreateException;
The bean's remote interface:
package converter;
import javax.ejb.EJBObject;
import java.rmi.RemoteException;
import java.math.*;
public interface Converter extends EJBObject {
public BigDecimal dollarToYen(BigDecimal dollars) throws RemoteException;
public BigDecimal yenToEuro(BigDecimal yen) throws RemoteException;
The j2ee application client:
import converter.Converter;
import converter.ConverterHome;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.rmi.PortableRemoteObject;
import java.math.BigDecimal;
public class ConverterClient {
public static void main(String[] args) {
try {
Context initial = new InitialContext();
System.setProperty("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory");
System.setProperty("java.naming.provider.url","jnp://10.144.97.250:3700");
Context myEnv = (Context) initial.lookup("java:comp/env");
Object objref = myEnv.lookup("ejb/SimpleConverter");
ConverterHome home =
(ConverterHome) PortableRemoteObject.narrow(objref,
ConverterHome.class);
Converter currencyConverter = home.create();
BigDecimal param = new BigDecimal("100.00");
BigDecimal amount = currencyConverter.dollarToYen(param);
System.out.println(amount);
amount = currencyConverter.yenToEuro(param);
System.out.println(amount);
System.exit(0);
} catch (Exception ex) {
System.err.println("Caught an unexpected exception!");
ex.printStackTrace();
}Surprisingly I find an upsurge in the number of posts with this same problem. I recently found a post which gave a nice link for this. Follow the steps and it should help:
http://docs.sun.com/source/819-0079/dgacc.html#wp1022105 -
NameNotFoundException - ${j2ee.client} not bound
Good day, all. I'm new to J2EE, so apologies up front if this is a brain-dead
question. I have done some searching around on the site, and have found similar
issues, but none which contain a working solution for me, as far as I can tell.
I'm attempting to write a J2EE client application using JBoss. I have a main function
which is attempting to look up entries from the server's Global JNDI context, and isn't
finding them.
My main():
package nameredacted;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import nameredacted.log.AccountingLog;
import nameredacted.log.AccountingLogFactory;
public class JobMain {
private static final AccountingLog log = AccountingLogFactory.getAccountingLog(JobMain.class);
public static void main(String[] args)
try
Context ctx = new InitialContext();
// v--- Explosion occurs below: ---v
String lookupName = (String)ctx.lookup("java:comp/env/name_space_root");
Context globalCtx = (Context)ctx.lookup(lookupName); // I don't ever get here.
if (log.isInfoEnabled())
log.info(null,"Loaded Global Context");
System.out.println("Yay");
System.out.println(globalCtx);
catch (NamingException e2)
log.warn("There was an error looking up the name_space_root: " + e2);
e2.printStackTrace();
}My jndi.properties file:
#jboss JNDI properties
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.provider.url=jnp://localhost:1099
java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
java.naming.factory.url.pkgs=org.jboss.naming.client
j2ee.clientName=PaymentQuartzMy application-client.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<application-client id="Application-client_ID" version="1.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application-client_1_4.xsd">
<display-name>PaymentQuartz</display-name>
<env-entry>
<env-entry-name>name_space_root</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>cell/persistent</env-entry-value>
</env-entry>
<ejb-ref id="EjbRef_1">
<ejb-ref-name>ejb/MyEjbHome</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<home>nameredacted.beans.MyEjbHome</home>
<remote>nameredacted.beans.MyEjb</remote>
</ejb-ref>
</application-client>My jboss-client.xml file:
<jboss-client>
<jndi-name>PaymentQuartz</jndi-name>
<ejb-ref>
<ejb-ref-name>ejb/MyEjbHome</ejb-ref-name>
<jndi-name>ejb/nameredacted/beans/MyEjbHome</jndi-name>
</ejb-ref>
</jboss-client>And finally, an excerpt from the error text:
[java] [2007-05-21 14:27:16,342] WARN quartz.main.JobMain - There was an error looking up the name_space_root: javax.naming.NameNotFoundException: PaymentQuartz not bound
[java] javax.naming.NameNotFoundException: PaymentQuartz not bound
[java] at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
[java] at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
[java] at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
[java] at org.jnp.server.NamingServer.lookup(NamingServer.java:296)
[java] at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown Source)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[java] at java.lang.reflect.Method.invoke(Method.java:585)
[java] at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
[java] at sun.rmi.transport.Transport$1.run(Transport.java:153)
[java] at java.security.AccessController.doPrivileged(Native Method)
[java] at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
[java] at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466)
[java] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
[java] at java.lang.Thread.run(Thread.java:595)
[java] at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
[java] at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
[java] at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:126)
[java] at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
[java] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:625)
[java] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
[java] at javax.naming.InitialContext.lookup(InitialContext.java:351)
[java] at org.jboss.naming.client.java.javaURLContextFactory$EncContextProxy.invoke(javaURLContextFactory.java:129)
[java] at $Proxy0.lookup(Unknown Source)
[java] at javax.naming.InitialContext.lookup(InitialContext.java:351)
[java] at nameredacted.JobMain.main(JobMain.java:26)
BUILD SUCCESSFULThanks in advance for your help: I think my monitor is beginning to bruise from repeated
head impacts...
Er, something.
kev
Message was edited by:
kevjava [added application-client.xml]I'm not familiar with the specifics of how the JBoss implementation requires that Application Client
components be executed so I'd recommend checking their documentation. There is often a
special command needed to run an Application Client within an Application Client container. It's
typically more than just configuring the client to bootstrap a particular naming provider.
For example, in the Java EE SDK, we have a special command called "appclient" that is used to
start an Applicaiton Client component. The Application Client container bootstraps the
correct naming provider, sets up the private component naming environment (java:comp/env),
handles any authentication, etc. You can find more information on the difference between
an Application Client and a "stand-alone java client" in our EJB FAQ :
https://glassfish.dev.java.net/javaee5/ejb/EJB_FAQ.html
--ken -
ABAP Client and J2EE client mismatch
Hello,
we detected mismatch between default ABAP login client and J2EE client.
Now we need to change J2EE client to default ABAP client.
Its ABAP + JAVA installation and diff. occured after client copy.
Can you please let us know where we need to change all setting for j2ee engine like default client for UME, sld etc.
Best Regards,
TusharHello. By default JAVA used the 001 client in ABAP+JAVA installation, be cautious with change it.
you can chage it through Config tool :
http://help.sap.com/saphelp_nw70/helpdata/EN/0b/50ad3e1d1edc61e10000000a114084/frameset.htm
or from UME --> configuration --> ABAP system. You need to read about change datasources :
http://help.sap.com/saphelp_nw70/helpdata/EN/7e/a2d475e5384335a2b1b2d80e1a3a20/frameset.htm
and about SAPJSF user.
http://help.sap.com/saphelp_nw70/helpdata/EN/db/8b9b801df84aaaa76bdbcbc0b9725f/content.htm
http://help.sap.com/saphelp_nw70/helpdata/EN/43/03e11edc6a6e99e10000000a11466f/content.htm
Regards. -
Intercept J2EE Client EJB2.x Invocations
Hi all,
I want to intercept EJB2.x invocations (*all requests and responses*) *only from
J2EE Client application side*(from WebSphere, Weblogic
vendors)
not from server side. My target is to record/save these invocations in XML.
Also i don't have any access to the source code of this existing J2EE Client application(have only binary distribution) so i cannot modify
anything in client application code.
I found this article with various possiblities
[http://www.elca.ch/site_repository/resources/InvokersNeedToBeAddedToJ2EE5_2.pdf]
1. CORBA PortableInterceptors but Weblogic has no support for PortableInterceptors.
2. Java's Dynamic Proxy Classes - maybe someone can elaborate it
3. AOP - which framework allows me to intercept ejb invocations only from client side without knowing the client internals
If anybody who has idea to solve this problem please help me.No response. Very strange!
-
I want to follow up on a sub-topic that came up in this thread:
Re: Mapping X.509 Cert. info to J2EE user
What concerns us is this:
In a J2EE X509 SSO scenario, we have a few choices to map user IDs to X509 certs. Our PKI is such that when a user logs into their PC, their roaming profile places their X509 certificate in their IE certificate store. This cert then gets used for a variety of enterprise apps, including SAP. It works as long as the user is at a PC they logged into. If they go to a public PC, like in a conference room, then they are aware that they have to log in manually since the conf. room uses a generic login.
For our environment of around 10,000 named users, we have them all mapped in our ABAP system table USREXTID. This is done automatically through a job that populates that table with data from our LDAP. The entry is simply CN=xxxxx and it's mapped to the SAP login ID.
This method is not possible with the J2EE side of things. Instead, the UME admin can manually import a client cert. We did that and it works.
Or, we can have the user map it themselves by clicking the "Certificate Login" link on the initial login screen and then authenticate themselves, which in turn populates their cert info into their UME record.
It is that method that concerns us. What's to stop user A from logging into his PC with his cert and then having user B come over and log into the app, subsequently perform that automatic mapping? User A would have user B's authorizations in future sessions on his own computer. We tested this and it is a technical possibility. Also if a cert is already mapped and a user clicks the "certificate login" button, then a new cert overwrites the old cert.
With our job that automatically maps CN=xxxxx info to SAP Logins in ABAP, this risk is completely eliminated. Only a user logged into their own PC, with their own Windows/XP credentials, can access the SAP app with their cert.
Please help me understand if I am missing something that eliminates the risk I've pointed out.> user A has a cert on his PC and it's mapped to his account.
> user B has a cert on his own PC, but has not mapped to an account yet.
> user A goes to user B's computer and click's the 'certificate login' button.
> he authenticates his account to user B's certificate.
Yes, but that sounds like: user A "donates" his account to user B.
Notice: user B (and only him has access to the private key of his certificate) can then logon (with his X.509 client certificate) under the account of user A.
> I tested this and it works as i described - what happens is the
> user A cert in user A's account is <b>replaced</b> with the user B cert.
> There isn't even a warning, it just happens.
Well, that's because of being able to update the certificate mapping.
Notice: certificates do have a limited lifetime - they will expire sooner or later. A follow-up certificate is supposed to substitute the previous one. In most cases the subject name will remain unchanged - but that's not guaranteed ... (it might be more than just the sequence number that has changed).
Regards, Wolfgang
PS: "CERTMAP" is just an offer - it might not be suitable in all cases (e.g. in such cases where a PC is not really a "Personal Computer" but used by different users without logoff from the OS level before handing over the PC to the next person - which will also allow that person to gain access to the Outlook inbox, file shares, etc.). -
Windows 7 (Client) map a network drive VPN Snow Leopard Server
Hi,
I have a Mac Mini Snow Leopard Server and are using a VPN service.
My services on the mac os x sls server are: AFP, DNS, Firewall, Open Directory, SMB and VPN.
I can connect the VPN from Mac clients and Windows 7 clients, but I can only map a network drive/share point on Mac´s.
On Windows 7 I get an error: path or name not found ( I am sure using the correct path, same from Mac client that works).
When I am using my internal network LAN I can map a network drive using Windows 7 and Mac but outside over a VPN not (only Mac works).
The only service, at this moment, that I need is File Sharing outside my network LAN using a VPN.
How can I map a network drive from a Windows 7 client using a VPN, is there any Firewall rules / SMB rules / File Sharing rules that I missed on the server side?
Thank You.I really don't know what are going wrong with my settings. As you said/write it must be an easy setup.
I'm using a Time Capsule and used the Server app to add VPN to the port forwarding also.
When I am connected thru the VPN I tried to ping the Server IP and got no answer from it, from W7 client!?
My Mac's are just working fine with AFP and SMB share points thru the VPN.
I think I have missed some settings from the SMB or Firewall services for VPN with W7 client's or it is a Windows issue..... -
J2EE Client Application (weblogic.ClientDeployer)
Hello,
I'm experimenting with the ClientDeployer utility as described in the 6.1
documentation, and I face some odd behavior.
I created a jar file (cli.jar) containing the class files of my client application,
and a META-INF/application-client.xml file.
This jar file then gets stored in an ear file, together with a cli.runtime.xml
file
and a META-INF/application.xml file.
Afterwards, I tried running this client application by using
java weblogic.ClientDeployer clients.ear cli
Now, all of this works, as long as I leave the cli.runtime.xml file in the
current directory. But as soon as I remove this file from the current
directory, it stops working. This means that ClientDeployer doesn't read
the cli.runtime.xml file from the ear file, but only from the current directory.
Is that the way it is supposed to work ? I would expect it to read the
runtime file form the ear file ?
Thanks,
Francois Staes.Hi Sandy,
If I understand you correctly, then you are asking how to make
a stand-alone java client, right? According to the J2EE spec, a
stand-alone java client also needs to be deployed to a container.
A long time ago (before OC4J, when there was only OrionServer)
I struggled for about a week before finally figuring out how to
do this.
However, I then discovered that, with OrionServer (and therefore
also with OC4J), your stand-alone java client does not have
to be deployed to a container and can be launched from the command
line with the "java" command.
If you do want to deploy your java client, then the only way
I know to launch it is by using the "applicationlauncher.jar"
file. This file was part of the first OC4J (version 1.0.2.2).
It disappeared in the next version (9.0.2) and now has reappeared
in the latest version (9.0.3) -- go figure! Like I said, by the
time I started using OC4J, I was only using non-deployed clients,
so I had no need for "applicationlauncher.jar", so the fact it
was missing from version 9.0.2 didn't affect me.
In any case, I recall information on how to use the "applicationlauncher.jar"
file on the following web sites:
http://www.orionserver.com
http://www.orionsupport.com
http://www.atlassian.com
http://www.elephantwalker.com
I also recall answering similar questions several times previously
on this forum, so a search of the forum archives may also help.
I hope I have correctly interpreted your question and given you
a helpful answer.
Good Luck,
Avi. -
Get URL for J2EE client application
Please forgive me if this question has an obvious answer, but I can't see it.
Once Web Start has downloaded and started my J2EE Swing application client, how can my client get the name of the host (or entire URL) from which the client was downloaded?
I would rather not have to hard code this into my client, so that the WAR file I deploy to the server is platform independent.
bobj5000Use the JNLP BasicSevice API getCodeBase() to get the URL of the server.
BasicService bs = (BasicService)ServiceManager.lookup("javax.jnlp.BasicService");
URL url = bs.getCodeBase();
Hope this helps
Jeff -
Hi all,
I have to direct data comming from 1 system to several SAR R/3 clients. (through XI)
As I see it I have 2 choices:
1: To set up conditions in my Receiver Determination saying that if mandant = 101 then I call Service 101 and so forth.
2: To set up an "enhanced receiver determination" and with a mapping program determine the receivers of the message dynamically at runtime.
My question is:
Does any one have experience with these methods?
We have a very heavy data-load (transfering millions of messages) - which method would be best, performance wise?
To me, method number 2 seams very "expencive" to performance?
Thank you
Regards, ThomasHi Thomas,
>>1: To set up conditions in my Receiver Determination saying that if mandant = 101 then I call Service 101 and so forth.
It just the other way around: if there is a special value in my payload then connect to a special client
>>2: To set up an "enhanced receiver determination" and with a mapping program determine the receivers of the message dynamically at runtime. To me, method number 2 seams very "expencive" to performance?
No, i dont think so. The result could be be quite simple, you should be able to implement a fast programm (ABAP or JAVA), what can be reused for many cases. So develop time is only once.
Dont think only to the performance. If you have many SAP clients, you should watch as well scalability and maintenance. From that point of view it could be useful to have the extended receiver determination in case of a lot inbound interfaces. Otherwise you could have too much IB directory objects which avoid maintenance and a easy roll out.
Regards,
Udo -
Problem when j2ee client try to access ejbs
Hi All
i change my oracle app server prorts numbers for rmi, jms ,ajp, . After that i can not acces EJB using java standalong client.i show following error.
"Oct 16, 2006 9:52:58 PM oracle.j2ee.clustering.ClusteringMessages warningInOpmnGetServers
WARNING: Error in obtaining server list from OPMN on host localhost:18403. Please verify that OPMN is running."
Thanks
Asanka PRiyanjithI have the same problem with the default ports.
Did you find a solution?
What's your JNDI factory, what's your provider url?
Which version of the oracle application server are you using?
Best regards.
Robin -
Small weblogic.jar for jms/j2ee clients of weblogic
We are trying to create a smaller footprint for the ~38M weblogic.jar for distribution
to our client applications to use the JMS and J2EE features of Weblogic 7.0sp2.
I attempted to use the whitepaper document distributed by BEA for creating a smaller
jar file, but it did not work. Has anyone else in the user community successfully
created the jar file and if so could they give me some insight on how they did
it.
Thanks,
Ashish
Hi Ashish,
I've personally used the "URL" class loader option with success,
and I know that several customers have also used this option, as
well as the other options for years. Feel free to
post more detail than "it did not work", and I may be able
to help you out.
Tom, BEA
P.S. If 8.1 is an option, you may with to consider using the
thin client jars it supplies.
Ashish Bisarya wrote:
> We are trying to create a smaller footprint for the ~38M weblogic.jar for distribution
> to our client applications to use the JMS and J2EE features of Weblogic 7.0sp2.
> I attempted to use the whitepaper document distributed by BEA for creating a smaller
> jar file, but it did not work. Has anyone else in the user community successfully
> created the jar file and if so could they give me some insight on how they did
> it.
>
> Thanks,
> Ashish
-
J2EE client cann't run: javax.naming.NameNotFoundException
I am trying to run converter example in Sun's J2ee tutorial, relavant files are put in directories like the following, I have no problem with compiling, but when I run the client, there are error msgs:
Caught an unexpected exception!
javax.naming.NameNotFoundException: No object bound for java:comp/env
at com.sun.enterprise.naming.java.javaURLContext.lookip(javaURLContext.java:116)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at ConverterClient.main(Unknow Source)
since I didn't use deploytool provided by j2ee, I am not sure if the problem was caused by my deployment descriptor or naming server, I don't know what "java:comp/env" is, would anyone help? Thanks!!!
The relevant files are as the following, except the ConverterClient.java and ejb-jar.xml, others are exactly the same as that in j2ee tutorial
/mydir/javaprog/build/converter/Converter.class
ConverterHome.class
ConverterBean.class
ejb-jar.xml
/mydir/javaprog/client/converter/ConverterClient.class
/mydir/javaprog/lib/converter.jar
/*Converter.java*/
import javax.ejb.EJBObject;
import java.rmi.RemoteException;
import java.math.*;
public interface Converter extends EJBObject {
public BigDecimal dollarToYen(BigDecimal dollars) throws RemoteException;
public BigDecimal yenToEuro(BigDecimal yen) throws RemoteException;
/*ConverterHome.java*/
import java.io.Serializable;
import java.rmi.RemoteException;
import javax.ejb.CreateException;
import javax.ejb.EJBHome;
public interface ConverterHome extends EJBHome {
Converter create() throws RemoteException, CreateException;
/*ConverterBean.java*/
import java.rmi.RemoteException;
import javax.ejb.SessionBean;
import javax.ejb.SessionContext;
import java.math.*;
public class ConverterBean implements SessionBean {
BigDecimal yenRate = new BigDecimal("121.6000");
BigDecimal euroRate = new BigDecimal("0.0077");
public BigDecimal dollarToYen(BigDecimal dollars) {
BigDecimal result = dollars.multiply(yenRate);
return result.setScale(2,BigDecimal.ROUND_UP);
public BigDecimal yenToEuro(BigDecimal yen) {
BigDecimal result = yen.multiply(euroRate);
return result.setScale(2,BigDecimal.ROUND_UP);
public ConverterBean() {}
public void ejbCreate() {}
public void ejbRemove() {}
public void ejbActivate() {}
public void ejbPassivate() {}
public void setSessionContext(SessionContext sc) {}
} // ConverterBean
/*ConverterClient.java*/
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.rmi.PortableRemoteObject;
import java.math.BigDecimal;
public class ConverterClient {
public static void main(String[] args) {
try {
Context initial = new InitialContext();
Context myEnv = (Context)initial.lookup("java:comp/env");
Object objref = myEnv.lookup("SimpleConverter");
ConverterHome home =
(ConverterHome)PortableRemoteObject.narrow(objref,
ConverterHome.class);
Converter currencyConverter = home.create();
BigDecimal param = new BigDecimal ("100.00");
BigDecimal amount = currencyConverter.dollarToYen(param);
System.out.println(amount);
amount = currencyConverter.yenToEuro(param);
System.out.println(amount);
System.exit(0);
} catch (Exception ex) {
System.err.println("Caught an unexpected exception!");
ex.printStackTrace();
ejb-jar.xml
<?xml version="1.0" encoding="UTF-8"?>
<ejb-jar>
<description>Converter Application</description>
<display-name>Converter EJB</display-name>
<enterprise-beans>
<session>
<ejb-name>SimpleConverter</ejb-name>
<home>ConverterHome</home>
<remote>Converter</remote>
<ejb-class>ConverterBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Bean</transaction-type>
</session>
</enterprise-beans>
</ejb-jar>I have such a problem with Bea weblogic 6.1 EJB Server, trying to connected it from Tomcat (don't know, if it would work anyway):
If I try to lookup with standard "java:comp/env/ejb/ObjRemote", it tell's me there is no comp/env/ejb Object !
All examples/docu I read for this topic told me to call lookup("ObjRemote").
So look it up this way: simply with this name lookup("ObjRemote")...
Maybe you are looking for
-
How to parse XML files from normal FTP Servers?
I want to parse xml files from a normal FTP Servers , NOT the sap application severs itself. How can i do that? I know how to use the SAPFTP getting and putting files ,but I don't want to download and then parse it. Who knows how to parse it directly
-
Publish failed (when using Calendar instead of GregorianCalendar..)
I have a web service written in Workshop 9.2.2 running on a WLS9.2 Server. One attribute in my web service is of type java.util.Calendar. Now when I try to publish that I get a "Publish Failed" almost immeditately. HOWEVER, when I change the type of
-
FMLE , video capture card
hi every body, can anyone tell me what video capture cards are compatible with FMLE3. thanks a lot.
-
Ipod touch does not appear in itunes 11 after upgrade
I upgraded my mac book pro to Mt. Lion and could still sync to my ipod. Then I upgraded my iphoto and itunes to the latest version. Now my ipod does not appear in itunes. I think I need to upgrade my ipod from 4.2.1 to io5, but cannot do that with
-
Importing photos from friends in facebook to I- Photo?
Importing photos from friends in facebook to I-Photo?