Ejb Client Access (ClassCastException)
This is the problem which i am facing for two weeks.
My deployment is doing fine.
When i try to run my Client i get an error like
java.lang.ClassCastException
and some sentences related to PortableRemoteObject.narrow.
I am not able to fix the bug.
Can any body help me out
[email protected]
Can you post the client code where you get the exception.
Similar Messages
-
EJB Client Access From JDeveloper9iR2
I seem to be running into a lot of problems when trying to get a simple EJB client to talk to an EJB on our 9IAS platform. I have developed a simple session bean (just to test) which simply returns a string. When I create the default client code this works fine using the embedded OC4J server in Jdeveloper but I can't run a similar client against 9IAS when I deploy the code. When I go through the client wizard it seems to produce the same code as the standalone EJB OC4J client. I simply changed the name of the server (Context.PROVIDER_URL, "ormi://pe2500/). This is the parameter code I use:
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY, "com.evermind.server.rmi.RMIInitialContextFactory");
env.put(Context.SECURITY_PRINCIPAL, "admin");
env.put(Context.SECURITY_CREDENTIALS, "welcome");
env.put(Context.PROVIDER_URL, "ormi://pe2500:23891/MyEJBs");
This is the output I receive:
D:\jdeveloper9ir2\jdk\bin\javaw.exe -ojvm -classpath D:\javadev\ejbservlet\ejbservlet\WEB-INF\classes;D:\jdeveloper9ir2\jdev\lib\jdev-rt.jar;D:\jdeveloper9ir2\j2ee\home\lib\ojsp.jar;D:\jdeveloper9ir2\j2ee\home\jsp\lib\taglib\ojsputil.jar;D:\jdeveloper9ir2\j2ee\home\oc4j.jar;D:\jdeveloper9ir2\j2ee\home\lib\servlet.jar;D:\jdeveloper9ir2\jdev\lib\ojc.jar;D:\jdeveloper9ir2\j2ee\home\lib\activation.jar;D:\jdeveloper9ir2\j2ee\home\lib\ejb.jar;D:\jdeveloper9ir2\j2ee\home\lib\jaas.jar;D:\jdeveloper9ir2\j2ee\home\lib\jaxp.jar;D:\jdeveloper9ir2\j2ee\home\lib\jcert.jar;D:\jdeveloper9ir2\j2ee\home\lib\jdbc.jar;D:\jdeveloper9ir2\j2ee\home\lib\jms.jar;D:\jdeveloper9ir2\j2ee\home\lib\jndi.jar;D:\jdeveloper9ir2\j2ee\home\lib\jnet.jar;D:\jdeveloper9ir2\j2ee\home\lib\jsse.jar;D:\jdeveloper9ir2\j2ee\home\lib\jta.jar;D:\jdeveloper9ir2\j2ee\home\lib\mail.jar;D:\jdeveloper9ir2\j2ee\home\oc4j.jar;D:\jdeveloper9ir2\lib\xmlparserv2.jar;D:\jdeveloper9ir2\lib\xmlcomp.jar;D:\jdeveloper9ir2\j2ee\home\oc4j.jar;D:\jdeveloper9ir2\j2ee\home\lib\servlet.jar Samplemypackage6.ctejb1Client3
javax.naming.NamingException: Lookup error: java.net.ConnectException: Connection refused: connect; nested exception is:
java.net.ConnectException: Connection refused: connect
java.lang.Object com.evermind.server.rmi.RMIContext.lookup(java.lang.String)
RMIContext.java:134
java.lang.Object javax.naming.InitialContext.lookup(java.lang.String)
InitialContext.java:350
void Samplemypackage6.ctejb1Client3.main(java.lang.String[])
ctejb1Client3.java:18
Process exited with exit code 0.
Can anyone tell me if this is the correct communication method for client EJB's talking to the 9IAS server?
Any help really appreciated.
Chris Taylorhi Chris Taylor, did you find the solution for this error. i too get this error and i am looking for the answer. if you find any answer please share with me too. if i get any answer for this i will reply you too.
-
Can a session EJB be accessed by more than one client?
Hello,
I would like to have an instance of a persistent EJB which is accessible by more than one client and which will not be destroyed after usage. Apparently session beans can only be accessed by one client and are created every time they are accessed. In my case this creation is quite time and resource consuming. Is it an alternative to use an entity bean instead, even if the logic of the bean doesn't have anything to do with direct database access?
Thanks.It seems to me that what you want is exactly a session bean will do. The EJB container is responsible to maintain a certain number instances (configurable) of your session bean and serve multiple clients at the same time. Session beans are not necessarily destroyed after serving a client. If you configure your ejb server to have a pool size of 2 to 100, then you will always have at least 2 instances (no more than 100 even there are a lot of client access) of this ejb ready to serve. The only thing not clear to me is that do you want to use only ONE instance of this bean or you don't care as long as multiple clients can access this bean's service? Since you mentioned that there is not a real database access, you can certainly use a Singleton but a 'regular' session bean with static fields should do it also if these fields will not be modified by clients.
PC -
ClassCastException exception while running EJB Client
Folks,
I am getting following exception while running the EJB Client.. I am
using WLS 5.1
Exception in thread "main" java.lang.ClassCastException
at
javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:319)
at FirstStatelessEJBClient.Client.lookupHome(Client.java:149)
at FirstStatelessEJBClient.Client.<init>(Client.java:44)
at FirstStatelessEJBClient.Client.main(Client.java:82)
Can anybody throw a light on this.
Thanks
AshishHi Eduardo,
Below is my classpath. The stubs are in first_statlessSession.jar file.
CLASSPATH=C:\weblogic\myserver\first_statelessSession.jar;
C:\jdk1.2.2\lib\tools.jar;C:\weblogic\license;C:\weblogic\classes;C:\weblogi
c\lib\weblogicaux.jar;
C:\weblogic\myserver\clientclasses;C:\weblogic\myserver\serverclasses
Also, I am just compiling and deploying the
C:\weblogic\examples\ejb\basic\statelessSession myself and testing it. I
am
using the build.cmd files to compile and deploy the above EJB. If I use the
jars provided by weblogic it works fine with same above classpath.
I don't know what to do next. I have invested the whole day to solve this
problem and couldn't.
Please let me know if I am doing anything wrong.
Appreciate your help.
Thanks,
Ashish
Eduardo Ceballos wrote:
Try putting the stubs into the client class path.
"Ashish N. Shah" wrote:
Folks,
I am getting following exception while running the EJB Client.. I am
using WLS 5.1
Exception in thread "main" java.lang.ClassCastException
at
javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:319)
at FirstStatelessEJBClient.Client.lookupHome(Client.java:149)
at FirstStatelessEJBClient.Client.<init>(Client.java:44)
at FirstStatelessEJBClient.Client.main(Client.java:82)
Can anybody throw a light on this.
Thanks
Ashish -
EJB deployment/access from the Client Machine
I want to deploy/access the EJB on the Oracle 8i server from the
Client Machine. From the Oracle 8i server machine i am able to
deploy and access the EJB
When i am trying to deploy/access the EJB i am getting the
following message
javax.naming.CommunicationException: Unknown service : sess_iopp
url
Please tell me what to do ?
Thanks in advance
nullAre you using JDeveloper? If yes then go to File|New->Snippets
and select 'Example JServer EJB Client' to create an EJB client.
: javax.naming.CommunicationException: Unknown service :
sess_iopp
It's sess_iiop not iopp ;-)
Regards,
Arun
Manish Patel (guest) wrote:
: I want to deploy/access the EJB on the Oracle 8i server from
the
: Client Machine. From the Oracle 8i server machine i am able to
: deploy and access the EJB
: When i am trying to deploy/access the EJB i am getting the
: following message
: javax.naming.CommunicationException: Unknown service :
sess_iopp
: url
: Please tell me what to do ?
: Thanks in advance
null -
One EJB object accessed by two clients.
One client access a EJB object another client access the same EJB
object, when the first client releases the ejb object, then second
client loses data or gets null.
Any body knows what is happening?
Thankshey,
is this with StatefulSession Bean. I too am experiencing the same problem. When two users are trying to access the same bean the same time, one is returing null. This being a UserSession Bean, one user is getting the session object as null..
Can anyone answer this problem....
cheers,
prasad. -
Can an EJB client application access to EJBs on two domains concurrently?
It is well-known that there can be multiple domains in a SUN application server. If two domains are started up, can the same EJB client application call different EJB methods from the two domains? If can, how to implement? Please kindly give a snippet of sample codes.
Another question: can EJBs among multiple domains communicate with each other? If can, tell me how to implement and had better provide some sample codes as well.I have my client working now!
I was looking around on other forums and found a guy who said that javax.comm has problems with security. here is the address
http://lists.dalsemi.com/maillists/java-powered-ibutton/2002-February/002168.html
He said,
"This is an error generated by the javax.comm packages when initializing
the
serial ports. It's basically a security related bug. Officially, all
packages stored in your lib/ext folder should be considered trusted
code,
running with the same permissions as your trusted main application. But
it
seems that isn't the case with comm.jar.
I've heard that signing the comm.jar file might fix it, but I wasn't
able to
verify that myself (but I didn't test with Netscape's java plugin). I
found
a workaround that should take care of it (as long as your main
application
has "all-permissions"). Try adding this line to the top of your main
method:
System.setSecurityManager(null);
So I did that and it worked except for one thing. at the end of my program the client tells me
The system cannot find the path specified.
Do you think this is a major problem? What is it trying to find??
Michael B -
Help: Problem in running a simple EJB client
Hi All,
I have just started learning EJB and I am facing an issue in running a client for the EJB I developed (a "Hello World" EJB)
I have deployed my application in Sun's reference implementation of j2ee server. I have the following client code through which I intend to access EJB methods
// EJB client code in main()
Context ctx = new InitialContext();
Object hwobj = ctx.lookup("HelloWorldApp");
HelloWorldHome hworldHome = (HelloWorldHome)
PortableRemoteObject.narrow(hwobj,HelloWorldHome.class); // exception here
HelloWorld hworld = hworldHome.create();
String msg = hworld.sayHelloWorld();
System.out.println(msg);
When I am running my client I am getting the following exception. Can anyone tell me why ?
java.lang.ClassCastException
at com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:296)
at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:137)
at HelloWorldClient.main(HelloWorldClient.java:13)
Thanks
Ratheesh* I found the solution for this . Add j2ee.jar and Client jar returned by deploytool [ if we check return client jar ] to classpath when running client .
* Then I got CORBA_NO_PERMISSION error . After searching in forum , I found the solution. Posting
Forum Home > Enterprise JavaBeans
Topic: [ J2EE RI Server ] CORBA NO_PERMISSION 0
Welcome ratheeshpai!
Search Forum
Not watching this topic.
This topic has 4 replies on 1 page (Most recent message: Nov 19, 2002 7:59 AM)
[ J2EE RI Server ] CORBA NO_PERMISSION 0
Author: NicholasHsiao Oct 28, 2001 5:51 AM
Hi,
I was trying to deploy one simple session bean into J2EE RI Server. It works fine. And I wrote one client to access this session bean, it show me
java.rmi.AccessException: CORBA NO_PERMISSION 0 No; nested exception is:
org.omg.CORBA.NO_PERMISSION: minor code: 0 completed: No
Context ic = null;
try
ic = new InitialContext();
catch(Exception e)
System.out.println("1: "+e.toString());
This exception is happend when I try to lookup the jndi name
This error message is happend only on J2EE 1.3 (1.3_01) . If I downgrade to J2EE 1.3Beta or even 1.2, everything would be okay. Any one know how to solve such problem ??
Re: [ J2EE RI Server ] CORBA NO_PERMISSION 0
Author: cdunn5
In Reply To: [ J2EE RI Server ] CORBA NO_PERMISSION 0 Oct 31, 2001 10:04 PM
Reply 1 of 4
hi,
I don't know the solution but I have the exact same problem. I see your message was posted in October, have you found any solutions yet?
Re: [ J2EE RI Server ] CORBA NO_PERMISSION 0
Author: scottiep
In Reply To: [ J2EE RI Server ] CORBA NO_PERMISSION 0 Nov 22, 2001 11:21 AM
Reply 2 of 4
Da:Frederik Hansen ([email protected])
Message 2 in thread
Soggetto:Re: J2EE - NO_PERMISSION
Newsgroups:dk.edb.programmering.java
View this article only
Data:2001-11-10 03:32:12 PST
For at svare p� mit eget sp�rgsm�l: Access and Security Issues Q1: Some applications that ran under J2EE SDK 1.3
beta 2 stop running under the 1.3 FCS release with the
following message: java.rmi.AccessException: CORBA
NO_PERMISSION 0 No. Why does this happen and what
can be done about it? When your application ran under the 1.3 beta 2
version of the reference implementation (RI), security permissions may
not have
been checked. For example, the beta 2 RI allowed
calls to enterprise beans that required username-password permission,
even
when the client provided no username-password
information. With 1.3 FCS release, the J2EE SDK became strict
about checking adherence to the security policies of J2EE components. How can you make your application run under the
FCS release? 1.If you don't want security checks, do the
following: Use the deploytool to build a deployment
descriptor that does not require a strict security policy: Under the Security screen of the EJB wizard
or the Security tab of the EJB inspector in deploytool, click
"Deployment
Settings..". Under the box "Client
Authentication", make sure "Support Client Choice" is checked instead of
"Certificate"
or "Password". 2.To require the application pass security
checks to run, do the following: When an enterprise bean specifies
"Certificate" or "Password" as the method of Client Authentication, use
a J2EE
application client, instead of a stand-alone
Java application, to access the bean. You will need to login as a valid
J2EE
user.
By : scottiep
Thanks
Ratheesh -
We've got problems with respect to the number of EJB client threads (ExecuteThread) spawned by WebLogic in a client JVM. As the number of threads increase (~1700 in a JVM with 512Mb of memory and 2 hours of uptime), the JVM performance degrades substantially - although almost all these threads are waiting for requests, as one can see in the thread dump attached bellow.
This problem happens in an integration scenario involving both WebLogic (8.1 and 6.1 as service providers) and webMethods Integration Server (version 6.0.1); the webMethods EJB adapter (version 1.2) acts like EJB client from the WebLogic instances, and the "EJB client spawning threads" can be detected by thread dumps extracted from the Integration Server JVM. The URL property from the wm EJB adapter has been setup as t3://server:port. The Integration Server runs with Java HotSpot(TM) Server VM (build 1.4.2 1.4.2.02-040225-19:18-PA_RISC2.0 PA2.0 (aCC_AP), mixed mode) JRE in HP-UX (11.11) environment.
Although we couldn't reproduce this problem in a prod like environemnt, we'd identified that initially, WebLogic (weblogic.jar from WebLogic 6.1) spawns 5 ExecuteThreads plus 3 additional threads (TimeEventGenerator, SpinnerRandomSource and HighPriority TimeEventGenerator) in the first access of an EJB not matter the instance used, as well as two new threads (ExecuteThread) for each access to new WebLogic instances (different from previously accessed WebLogic instances). With weblogic.jar from the WebLogic 8.1 SP4 the behavior is slightly different: from the second instance access toward, only two new Threads (ExecuteThread in weblogic.JavaSocketReaders queue) are created.
We have also noticed that this problem should not be reflect of context classloaders because the counter of the ExecuteThread for the default pool only increases; in case of a pool cached in separate context classloaders, we should see "duplicate" threads with the same counter (starting with 0), which is not the case.
The questions are 1) why weblogic is spawning so much threads; 2) is there any setup/config to limit the number of WebLogic threads in the client context ?
Excerpt from the thread dump:
Full thread dump Java HotSpot(TM) Server VM (1.4.2 1.4.2.02-040225-19:18-PA_RISC2.0 PA2.0 (aCC_AP) mixed mode):
"ExecuteThread: '1749' for queue: 'default'" daemon prio=10 tid=05734140 nid=4813 lwp_id=583942 in Object.wait() [0x0dfbe000..0x0dfbe4f0]
at java.lang.Object.wait(Native Method)
- waiting on <4a5ef9f0> (a weblogic.common.internal.DynaQueue)
at weblogic.common.internal.DynaQueue.getW(DynaQueue.java:228)
- locked <4a5ef9f0> (a weblogic.common.internal.DynaQueue)
at weblogic.socket.JavaSocketMuxer.processSockets2(JavaSocketMuxer.java:252)
at weblogic.socket.JavaSocketMuxer.processSockets(JavaSocketMuxer.java:233)
at weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:24)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
"ExecuteThread: '1742' for queue: 'default'" daemon prio=10 tid=04c263f0 nid=4812 lwp_id=583845 runnable [0x06449000..0x064494f0]
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at weblogic.socket.JavaSocketMuxer.processSockets2(JavaSocketMuxer.java:281)
- locked <4a5ee690> (a java.net.Socket)
at weblogic.socket.JavaSocketMuxer.processSockets(JavaSocketMuxer.java:233)
at weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:24)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
"ExecuteThread: '1735' for queue: 'default'" daemon prio=10 tid=05733fd8 nid=4811 lwp_id=583784 in Object.wait() [0x064ca000..0x064ca4f0]
at java.lang.Object.wait(Native Method)
- waiting on <4c40a6b8> (a weblogic.kernel.ExecuteThread)
at java.lang.Object.wait(Object.java:429)
at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:94)
- locked <4c40a6b8> (a weblogic.kernel.ExecuteThread)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:118)
"ExecuteThread: '1734' for queue: 'default'" daemon prio=10 tid=01ecd940 nid=4810 lwp_id=583783 in Object.wait() [0x0654b000..0x0654b4f0]
at java.lang.Object.wait(Native Method)
- waiting on <4c40a728> (a weblogic.kernel.ExecuteThread)
at java.lang.Object.wait(Object.java:429)
at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:94)
- locked <4c40a728> (a weblogic.kernel.ExecuteThread)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:118)
"ExecuteThread: '1733' for queue: 'default'" daemon prio=10 tid=05733e70 nid=4806 lwp_id=583777 in Object.wait() [0x066ce000..0x066ce4f0]
at java.lang.Object.wait(Native Method)
- waiting on <4c40a798> (a weblogic.kernel.ExecuteThread)
at java.lang.Object.wait(Object.java:429)
at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:94)
- locked <4c40a798> (a weblogic.kernel.ExecuteThread)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:118)
"ExecuteThread: '1732' for queue: 'default'" daemon prio=10 tid=01ecd7d8 nid=4801 lwp_id=583771 in Object.wait() [0x065cc000..0x065cc4f0]
at java.lang.Object.wait(Native Method)
- waiting on <4c40a808> (a weblogic.kernel.ExecuteThread)
at java.lang.Object.wait(Object.java:429)
at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:94)
- locked <4c40a808> (a weblogic.kernel.ExecuteThread)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:118)
"ExecuteThread: '1731' for queue: 'default'" daemon prio=10 tid=05733d08 nid=4798 lwp_id=583766 in Object.wait() [0x067d0000..0x067d04f0]
at java.lang.Object.wait(Native Method)
- waiting on <4c40a878> (a weblogic.kernel.ExecuteThread)
at java.lang.Object.wait(Object.java:429)
at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:94)
- locked <4c40a878> (a weblogic.kernel.ExecuteThread)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:118)
... (cut for brevity)
"ExecuteThread: '2' for queue: 'default'" daemon prio=10 tid=009251b8 nid=172 lwp_id=569500 in Object.wait() [0x3d61f000..0x3d61f4f0]
at java.lang.Object.wait(Native Method)
- waiting on <4a5b4498> (a weblogic.kernel.ExecuteThread)
at java.lang.Object.wait(Object.java:429)
at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:94)
- locked <4a5b4498> (a weblogic.kernel.ExecuteThread)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:118)
"ExecuteThread: '1' for queue: 'default'" daemon prio=10 tid=00924ee8 nid=171 lwp_id=569499 in Object.wait() [0x3d6a0000..0x3d6a04f0]
at java.lang.Object.wait(Native Method)
- waiting on <4a5b40f0> (a weblogic.kernel.ExecuteThread)
at java.lang.Object.wait(Object.java:429)
at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:94)
- locked <4a5b40f0> (a weblogic.kernel.ExecuteThread)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:118)
"ExecuteThread: '0' for queue: 'default'" daemon prio=10 tid=00925050 nid=170 lwp_id=569498 in Object.wait() [0x3d7a2000..0x3d7a24f0]
at java.lang.Object.wait(Native Method)
- waiting on <4a5b3d48> (a weblogic.kernel.ExecuteThread)
at java.lang.Object.wait(Object.java:429)
at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:94)
- locked <4a5b3d48> (a weblogic.kernel.ExecuteThread)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:118)
"Thread-2" daemon prio=10 tid=00bec5f0 nid=18 lwp_id=569246 in Object.wait() [0x41e2e000..0x41e2e4f0]
at java.lang.Object.wait(Native Method)
- waiting on <46c14ff0> (a com.wm.app.repov4.server.RepoServer$RepoLockTimeoutMgr)
at com.wm.app.repov4.server.RepoServer$RepoLockTimeoutMgr.run(RepoServer.java:1533)
- locked <46c14ff0> (a com.wm.app.repov4.server.RepoServer$RepoLockTimeoutMgr)
"Thread-1" daemon prio=10 tid=00bec488 nid=17 lwp_id=569244 in Object.wait() [0x41eaf000..0x41eaf4f0]
at java.lang.Object.wait(Native Method)
- waiting on <46c150a8> (a com.wm.driver.queue.data.DataQueue)
at java.lang.Object.wait(Object.java:429)
at com.wm.driver.queue.data.DataQueue.dequeue(DataQueue.java:310)
- locked <46c150a8> (a com.wm.driver.queue.data.DataQueue)
at com.wm.driver.queue.data.DataQueue.dequeueCommit(DataQueue.java:260)
- locked <46c150a8> (a com.wm.driver.queue.data.DataQueue)
at com.wm.driver.queue.data.DataQueue.dequeueCommit(DataQueue.java:254)
- locked <46c150a8> (a com.wm.driver.queue.data.DataQueue)
at com.wm.app.repov4.server.RepoServerBase$RepoEventManager.run(RepoServerBase.java:224)
"Log Thread" prio=10 tid=00bec320 nid=16 lwp_id=569243 in Object.wait() [0x41f30000..0x41f304f0]
at java.lang.Object.wait(Native Method)
- waiting on <46c15120> (a com.wm.util.sync.SimpleQueue)
at com.wm.util.sync.SimpleQueue.deq(SimpleQueue.java:171)
- locked <46c15120> (a com.wm.util.sync.SimpleQueue)
at com.wm.util.sync.SimpleQueue.deq(SimpleQueue.java:126)
- locked <46c15120> (a com.wm.util.sync.SimpleQueue)
at com.wm.app.b2b.server.ServerLogHandler$LogThread.run(ServerLogHandler.java:268)
"Cron Daemon" prio=10 tid=00bec1b8 nid=15 lwp_id=569241 in Object.wait() [0x41fb1000..0x41fb14f0]
at java.lang.Object.wait(Native Method)
- waiting on <46c15190> (a java.util.Vector)
at com.wm.util.Cron.run(Cron.java:424)
- locked <46c15190> (a java.util.Vector)
at java.lang.Thread.run(Thread.java:534)
"Cron Daemon Pool2" prio=10 tid=00bec050 nid=14 lwp_id=569240 in Object.wait() [0x42032000..0x420324f0]
at java.lang.Object.wait(Native Method)
- waiting on <46c15268> (a com.wm.util.pool.PooledThread)
at java.lang.Object.wait(Object.java:429)
at com.wm.util.pool.PooledThread.run(PooledThread.java:103)
- locked <46c15268> (a com.wm.util.pool.PooledThread)
at java.lang.Thread.run(Thread.java:534)
"Cron Daemon Pool1" prio=10 tid=00bebee8 nid=13 lwp_id=569239 in Object.wait() [0x420b3000..0x420b34f0]
at java.lang.Object.wait(Native Method)
- waiting on <46c152d0> (a com.wm.util.pool.PooledThread)
at java.lang.Object.wait(Object.java:429)
at com.wm.util.pool.PooledThread.run(PooledThread.java:103)
- locked <46c152d0> (a com.wm.util.pool.PooledThread)
at java.lang.Thread.run(Thread.java:534)
"webMethods Integration Server" prio=10 tid=000870e0 nid=12 lwp_id=569238 in Object.wait() [0x42134000..0x421344f0]
at java.lang.Object.wait(Native Method)
- waiting on <46c152f0> (a com.wm.app.b2b.server.Server)
at java.lang.Object.wait(Object.java:429)
at com.wm.app.b2b.server.Server.run(Server.java:353)
- locked <46c152f0> (a com.wm.app.b2b.server.Server)
"Signal Dispatcher" daemon prio=10 tid=00086f78 nid=7 lwp_id=569231 waiting on condition [0x00000000..0xffffffff]
"Finalizer" daemon prio=10 tid=00086e10 nid=5 lwp_id=569229 in Object.wait() [0x4293b000..0x4293b4f0]
at java.lang.Object.wait(Native Method)
- waiting on <46c15668> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:127)
- locked <46c15668> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:143)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:188)
"Reference Handler" daemon prio=10 tid=00086ca8 nid=4 lwp_id=569228 in Object.wait() [0x429bc000..0x429bc4f0]
at java.lang.Object.wait(Native Method)
- waiting on <46c15340> (a java.lang.ref.Reference$Lock)
at java.lang.Object.wait(Object.java:429)
at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:120)
- locked <46c15340> (a java.lang.ref.Reference$Lock)
"main" prio=10 tid=00086b40 nid=1 lwp_id=569222 in Object.wait() [0x68ff3000..0x68ff24f0]
at java.lang.Object.wait(Native Method)
- waiting on <46c152f0> (a com.wm.app.b2b.server.Server)
at java.lang.Thread.join(Thread.java:1001)
- locked <46c152f0> (a com.wm.app.b2b.server.Server)
at java.lang.Thread.join(Thread.java:1054)
at com.wm.app.b2b.server.Server.start(Server.java:141)
at com.wm.app.b2b.server.Main.main(Main.java:40)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.wm.proxy.Proxy.invokeStaticMethod(Proxy.java:166)
at com.wm.app.server.ServerProxy.ServerMain_main(ServerProxy.java:77)
at com.wm.app.server.ServerApp.start(ServerApp.java:105)
at com.wm.app.Application.launch(Application.java:490)
at com.wm.app.server.Main.main(Main.java:50)
"VM Thread" prio=7 tid=000167f8 nid=3 lwp_id=569227 runnable
"VM Periodic Task Thread" prio=8 tid=00016908 nid=11 lwp_id=569235 waiting on condition
"Suspend Checker Thread" prio=10 tid=00016880 nid=6 lwp_id=569230 runnableWe already opened a case. Actually, we did reproduce the problem: it happens because there is a hardware load balancing between the client and the WebLogic Server.
As far as I know, EJB load balancing can be done only with WebLogic clusters. Could you confirm that ? -
Two web apps using the same EJB client jar
I am currently deploying two web apps on a server. Both web apps use an EJB client
jar (the same jar) to access EJB's and both apps work when tested independently.
The problem arises when I log into app A and then log into app B. As soon as
I do app A loses it's references to the EJBHomes, and other classes.
It seems a classloader is unloading the first classes and instances loaded by
the first app and then loading them from app B's client.jar.
If I put the client.jar in the system classpath everything is fine, but that's
just a hack.
Is it not possible to deploy two web apps on a server using the same client.jar's
in their own WEB-INF/lib's?Joe,
As Pravin mentions, the checking of those boxes in Workbench triggers scheduled jobs within the EAC that kicks off the scripts at the appropriate time/day. But as you've noticed, there's not a ton of flexibility and you don't get cron or Windows Scheduler-type capabilities.
If you need to do something special, you can manually kick off the report generation scripts from your control directory using the runcommand.bat (or sh) script or place the command into a cron/Windows Scheduler job:
For example, to kick off the WeeklyReports job, you would do this:
runcommand.sh WeeklyReports runSo, assuming you go down the route of creating multiple ReportGenerators and scripts, you would create a job to kick off the new script you've created at the appropriate time.
Hope that helps,
Patrick
http://branchbird.com -
EJB Client timing out with PeerGoneException
Environment: WLS 6.1 SP4 on WIn2K.
We have an ejb client calling a StatelessSession bean on the server. From
time to time, if there's a large amount of data
coming across (eg. 5 Meg and above ) the call, invariably we'd get a
PeerGone Exception.
eg.. mySessionEJB.logHistory( String logMsg)
Is there a way to increase the timeout on the call?Hello
1) The web app is JSP based portal , which sends requests to another server using SOAP as a protocol.
2) The test client in this case , has been developed by us, which just sends requests to the using simple urls . In other words the client simulates a user accessing a JSP page, and requesting information.
3) The request being sent by the client , are to get the data stored on the Back end server. Each request has a specified timeout , configurbel using the web.xml file. In this case we have specified a very large value 0f about 3 hours ( which should be sufficient in most cases ). If the client does not get back the data within the specified time there are two causes
1) The request has not been sent to the back end server
2) The Back end server has not responded within the specified time
But on comparing the CPU usages, the back end server seems to be almost idle. whereas the Application server is consuming close to 100% CPU continuously.
thanks
-Aniruddha -
JAAS client access instead of JNDI
Hi,
I'm exploring using the JAAS client access instead of JNDI access on WL7.
The Docs say I have to write a LoginModule. However, the following
appears to work too (and of course, I'm not using a LoginModule):
Environment env = new Environment();
env.setProviderUrl(url);
env.setSecurityPrincipal(username);
env.setSecurityCredentials(password);
Subject sub = new Subject();
Authenticate.authenticate(env,sub);
System.err.println("SUBJECT IS " + sub.toString());
SampleAction sampleAction = new SampleAction(url);
Security.runAs(sub, sampleAction);
The LoginModule approach just appears to be a convoluted way of doing
the same thing, so why do I need it?
Also, the WebLogic examples do all sorts of strange things in their
example LoginModule, like their commit does this:
final PasswordCredential passwordCred = new
PasswordCredential(username, password);
AccessController.doPrivileged(new PrivilegedAction() {
public java.lang.Object run() {
subject.getPrivateCredentials().add(passwordCred);
return null;
(see http://edocs.bea.com/wls/docs70/security/fat_client.html#1029441)
Surely this is not necessary - cos the actuall login call to
Authenticate.authenticate would have populated the subject properly.
Any ideas? TIA.
QYou may want to read "Small Footprint Client Options for BEA WebLogic Server"
paper (http://dev2dev.bea.com/resourcelibrary/whitepapers.jsp?highlight=whitepapers)
Madhu <[email protected]> wrote:
infact for a remote client to access the EJB, what are the necessary jar/files
needed apart from the myejb.jar.
Do we need to copy the complete weblogic.jar and weblogic/classes folder?
"Madhu" <[email protected]> wrote:
Even i have the same problem. I had to copy the weblogic.jar, and all
the weblogic/classes
folder to the client machine.
I am thinking that this is a wrong process, and the jndi.jar is sufficient
enough
to make a lookup of home objects.
I would appreciate If anyone has any solution other than copying the
complete
40M bytes.
-Madhu
Dimitri -
EJB client still need EJB stub when it's already compiled?
Hi,
I know an EJB client needs stub of EJB components to compile itself. However, does an EJB client still need stub when it's executed?Hi,
I know an EJB client needs stub of EJB components to
compile itself. EJB components should not need access to any stubs at compile time. All they need is access to the API classes, e.g. javax.ejb.*. The need for RMI-IIOP stubs is a vendor-specific issue. Some J2EE implementations require them, some don't. E.g., in the J2EE SDK we don't generate static RMI-IIOP stubs so the developer doesn't have to know about them at all.
However, does an EJB client still
need stub when it's executed? -
How to run Session ejb client program?
Hi
I am using weblogic server8.1 . I was running an ejb session client program it throws exception like below. Can any one tell me how to run a client in weblogic server. give the syntax for running ejb client.
D:\Weblogicserver\user_projects\domains\mydomain\applications\MyEJB\stateful>jav
a -cp .;c:\j2ee\j2ee.jar;c:\weblogic\classes;D:\Weblogicserver\weblogic81\server
\lib\weblogic.jar PortfolioClient
Exception in thread "main" java.lang.NoClassDefFoundError: PortfolioClient (wron
g name: stateful/PortfolioClient)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12
3)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
byeIf stateful is the package for the client application, you should be executing from
D:\Weblogicserver\user_projects\domains\mydomain\applications\MyEJB
on the command line. The command should look like -
java -classpath <whatever should be here> stateful.MyClient -
Hi,
I m working with Jdeveloper 10G and oracle 9IAS 9.0.3.
I ve deployed an Ejb module on 9IAS
I m now wondering how generate the EJB client jar (Stubs and interfaces )to access my EJB module from anywhere.
Any Idea?I found the answer.
specify the client jar name in the jar settings and the workshop will generate the client jar for you.
inlcude the client jar and the wlclient.jar in the remote client application.
Maybe you are looking for
-
How can I redirect APEX(EPG) URL with afrindly one
Hi All, I am using APEX with EPG on oracle 11g, and I would to redirect the URL http://localhost:8080/apex/f?p=122:1:43920293912715::NO with a friendly one like this http://project_name.mydomain.com Is there any one can help me know; how to do this r
-
I have an early 2009 Airport Extreme Base Station. My "high speed" internet connection is a wireless connection from Skybeam. When I use either the Airport Setup Utility or the Airport Utility, the AEBS does not recognize when I plug the cable from S
-
my iphone 5 suddenly has a white blank screen, no liquid contact or history of fall, what can i do with this problem?
-
Recover a partner function in partner determination procedure
hi, Could anyone please tell how can we recover a partner function if it has been deleted from the partner determination procedure. Thanks and Regards Mahavir
-
How do I restart a paused download of numbers '09?
My download of numbers and imovie were paused and now I can't restart either. How do I get them restarted?