Weblogic redeploys EJB despite warning
I have my EJB Home and Remote classes in Weblogic's classpath while the EJB Jar (which contains Home , Remote and Bean) in the "applications" directory. When I start up the server , Weblogic deploys the EJB but gives the warning :
<Warning> <EJB> <EJB Deployment: ExampleBean cannot be redeployed while the server is running. ExampleHome is located in the server's classpath.>
However , if I keep the server running and redeploy a new implementation of the EJB , Weblogic is able to pick up the new implementation.
Somehow Weblogic's warning and behaviour do not tally. Can I count on the fact that I can redeploy the EJB even though the Home and Remote is in the classpath ?
I am running Weblogic 6.1 on Win2k.
Thanks.
Kean
Hi Kean,
You can still redeploy the ejb-jar file but any changes made to your home and remote interfaces will not be reflected in the new deployment if those interfaces exist in the server classpath.
- Matt
Kean wrote:
I have my EJB Home and Remote classes in Weblogic's classpath while the EJB Jar (which contains Home , Remote and Bean) in the "applications" directory. When I start up the server , Weblogic deploys the EJB but gives the warning :
<Warning> <EJB> <EJB Deployment: ExampleBean cannot be redeployed while the server is running. ExampleHome is located in the server's classpath.>
However , if I keep the server running and redeploy a new implementation of the EJB , Weblogic is able to pick up the new implementation.
Somehow Weblogic's warning and behaviour do not tally. Can I count on the fact that I can redeploy the EJB even though the Home and Remote is in the classpath ?
I am running Weblogic 6.1 on Win2k.
Thanks.
Kean
Similar Messages
-
Call another WebLogic's EJBs from resource adapter?
Is it possible to call another WebLogic's EJBs from a resource adapter?
A call to the javax.naming.InitialContext(Hashtable environment) results in a
VersioningError:
weblogic.common.internal.VersioningError: Incompatible service packs in CLASSPATH:
(BEA Systems, WebLogic Server 6.1 SP4 11/08/2002 21:50:43 #221641 , 6.1.4.0)
not compatible with
(BEA Systems, WebLogic Server 6.1 SP3 06/19/2002 22:25:39 #190835 , 6.1.3.0)
at weblogic.common.internal.VersionInfo.verifyPackages(VersionInfo.java:128)
at weblogic.common.internal.VersionInfo.<init>(VersionInfo.java:60)
at weblogic.common.internal.VersionInfo.initialize(VersionInfo.java:79)
at weblogic.kernel.Kernel.initialize(Kernel.java:122)
at weblogic.kernel.Kernel.ensureInitialized(Kernel.java:101)
at weblogic.jndi.WLInitialContextFactoryDelegate.<init>(WLInitialContextFactoryDelegate.java:166)
at java.lang.Class.newInstance0(Native Method)
at java.lang.Class.newInstance(Class.java:232)
at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:147)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:241)
at javax.naming.InitialContext.init(InitialContext.java:217)
at javax.naming.InitialContext.<init>(InitialContext.java:193)
at java.lang.reflect.Constructor.newInstance(Native Method)
I'm not sure it will always be possible to match the version, although here upgrading
the SP3 to SP4 will probably be done soon.
Does anyone have experience with this?
Or better: is there any documentation on this issue?
Hi Hans,
Here is the link for Weblogic SP3 / SP4 vulnerability and comparison for
http://216.239.53.104/search?q=cache:RqqaQ3HZdwoJ:www.nipc.gov/cybernotes/2003/cyberissue2003-06.pdf+Versioning+Error+in+BEA+weblogic+6.1+SP3+and+SP4&hl=en&ie=UTF-8
Hope this will help you.
Let me know if u have any further problems.
rgds
KSK
"Hans Bausewein" <[email protected]> wrote:
>
>
>Is it possible to call another WebLogic's EJBs from a resource adapter?
>
>A call to the javax.naming.InitialContext(Hashtable environment) results
>in a
>VersioningError:
>
>weblogic.common.internal.VersioningError: Incompatible service packs
>in CLASSPATH:
>(BEA Systems, WebLogic Server 6.1 SP4 11/08/2002 21:50:43 #221641 ,
>6.1.4.0)
>not compatible with
>(BEA Systems, WebLogic Server 6.1 SP3 06/19/2002 22:25:39 #190835 , 6.1.3.0)
> at weblogic.common.internal.VersionInfo.verifyPackages(VersionInfo.java:128)
> at weblogic.common.internal.VersionInfo.<init>(VersionInfo.java:60)
> at weblogic.common.internal.VersionInfo.initialize(VersionInfo.java:79)
> at weblogic.kernel.Kernel.initialize(Kernel.java:122)
> at weblogic.kernel.Kernel.ensureInitialized(Kernel.java:101)
> at weblogic.jndi.WLInitialContextFactoryDelegate.<init>(WLInitialContextFactoryDelegate.java:166)
> at java.lang.Class.newInstance0(Native Method)
> at java.lang.Class.newInstance(Class.java:232)
> at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:147)
> at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:241)
> at javax.naming.InitialContext.init(InitialContext.java:217)
> at javax.naming.InitialContext.<init>(InitialContext.java:193)
> at java.lang.reflect.Constructor.newInstance(Native Method)
>
>
>
>I'm not sure it will always be possible to match the version, although
>here upgrading
>the SP3 to SP4 will probably be done soon.
>
>Does anyone have experience with this?
>
>Or better: is there any documentation on this issue?
>
-
Does WebLogic mangle EJB names?
My web app has an EJB named like this in web.xml:
<ejb-ref-name>ejb/MTI/UserManager</ejb-ref-name>
The code tries to look up that EJB using the initialContext.lookup() method,
using the name specified above. This works under Orion 1.5.2, but under
WebLogic 6.1 sp1, it throws this exception:
javax.naming.NameNotFoundException: Unable to resolve
ejb.MTI/UserManager Resolved: '' Unresolved:'ejb' ; remaining name
'MTI/UserManager'
Notice that the first slash is a period in the WebLogic exception message.
Is WebLogic mangling EJB names? What should I do to get my web app to work
under WebLogic?As an aside, its not a good idea to have your EJB lookups and your JNDI
names the same.
ejb/MTI/UserManager is the correct convention for the ejb-ref-name - which
is what your code is looking up.
Your JNDI name should look something like Application.Component.Version (if
you have to version... otherwise leave it off)
Not that this is the answer to your problem - but when you do this, you will
have a clearer understanding if your lookup in your code is wrong or whether
your JNDI mapping is wrong.
"Eric Hodges" <[email protected]> wrote in message
news:3c6a87fb$[email protected]..
>
"Kumar Allamraju" <[email protected]> wrote in message
news:[email protected]..
Have you defined the corresponding ejb-ref-name & mapped it to
the actual jndi name in weblogic.xml
Refer the following doc
http://e-docs.bea.com/wls/docs61/webapp/web_xml.html#1020090
You mean like this?
<ejb-reference-description>
<ejb-ref-name>ejb/MTI/UserManager</ejb-ref-name>
<jndi-name>ejb/MTI/UserManager</jndi-name>
</ejb-reference-description>
If so, then yes. That's in my weblogic.xml file. -
Can Oracle SQL Flavor be used When BC4J is deployed in WebLogic as EJB?
Hi,
Does anybodys know if Oracle SQL Flavor can be used When BC4J is deployed in WebLogic as EJB?
We succeeded in deploying BC4J to WebLogic 7.0 & 6.0, but we had to select the SQL92 option for SQL Flavor when the first BC package is created in a project. Selecting Oracle option for SQL Flavor will cause EJB to fail, and client get a ClassCastException.
We still want to use Oracle SQL, is it possible to use it with WebLogic?
Thanks.We figured out that Oracle SQL Flavor can be used with WebLogic, but only with DB connections created from JDBC URL, not work with DB connections from WebLogic connection pool.
-
Hi I´m facing this problem, I test the queue destination with an external client and everything is ok, but then when I try to deploy the Message - Driver - bean on CE the next error comes out , any help will be appreciated.
--- Deploying file(s):
C:Documents and Settingse100009workspace.jdi xenapjmsEAR xenapjmsEAR.ear
--- Status:
Deploy finished with warnings.
--- Description:
S U M M A R Y
~~~~~~~~~~~~~~~~~~~
Successfully deployed: 0
Deployed with warnings: 1
Failed deployments: 0
~~~~~~~~~~~~~~~~~~~
1. File:C:Documents and Settingse100009workspace.jdi xenapjmsEAR xenapjmsEAR.ear
Name:fxenapjmsEAR
Vendor:com.sap
Location:localhost
Version:2010.02.02.12.47.07
Deploy status:Warning
Version:HIGHER
Description:
1. Warning occurred on server 9111850 during update com.sap/fxenapjmsEAR : SessionsTakerTest: Following tests could not be executed because of failed precondition test "SessionsTakerTest" : Classes Exposure Check, Business Interfaces Check, file: fxenapjms.jar, column -1, line -1, severity: warning
2. Exception has been returned while the [com.sap/fxenapjmsEAR] was starting. Warning/Exception :[
][[ERROR CODE DPL.DS.6193] Error while ; nested exception is:
com.sap.engine.services.deploy.exceptions.ServerDeploymentException: [ERROR CODE DPL.DS.5030] Clusterwide exception: [server ID 9111850:The destination jmsqueues/default/sapDemoQueue cannot be looked up. Last attempt performed : jms_vendor_queues_global/jmsqueues/default/sapDemoQueue
-> Path to object does not exist at jmsqueues, the whole lookup name is jms_vendor_queues_global/jmsqueues/default/sapDemoQueue.
server ID 9111850:com.sap.engine.services.deploy.container.DeploymentException: Cannot activate endpoint for message-driven bean com.sap/fxenapjmsEAR*annotation|fxenapjms.jar*annotation|fxenapmjbBean
at com.sap.engine.services.ejb3.container.ContainerInterfaceImpl$Actions.perform(ContainerInterfaceImpl.java:903)
at com.sap.engine.services.ejb3.container.ContainerInterfaceImpl.prepareStart(ContainerInterfaceImpl.java:435)
at com.sap.engine.services.deploy.server.utils.container.ContainerWrapper.prepareStart(ContainerWrapper.java:363)
at com.sap.engine.services.deploy.server.application.StartTransaction.prepareCommon(StartTransaction.java:228)
at com.sap.engine.services.deploy.server.application.StartTransaction.prepare(StartTransaction.java:186)
at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhasesOnOneServer(ApplicationTransaction.java:502)
at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhases(ApplicationTransaction.java:544)
at com.sap.engine.services.deploy.server.application.ParallelAdapter.super_MakeAllPhases(ParallelAdapter.java:286)
at com.sap.engine.services.deploy.server.application.StartTransaction.makeAllPhasesImpl(StartTransaction.java:555)
at com.sap.engine.services.deploy.server.application.ParallelAdapter.runInTheSameThread(ParallelAdapter.java:197)
at com.sap.engine.services.deploy.server.application.ParallelAdapter.makeAllPhasesAndWait(ParallelAdapter.java:358)
at com.sap.engine.services.deploy.server.DeployServiceImpl.startApplicationAndWait(DeployServiceImpl.java:3432)
at com.sap.engine.services.deploy.server.DeployServiceImpl.startApplicationAndWait(DeployServiceImpl.java:3418)
at com.sap.engine.services.deploy.server.DeployServiceImpl.startApplicationAndWait(DeployServiceImpl.java:3308)
at com.sap.engine.services.deploy.server.DeployServiceImpl.startApplicationAndWait(DeployServiceImpl.java:3280)
at com.sap.engine.services.dc.lcm.impl.J2EELCMProcessor.doStart(J2EELCMProcessor.java:105)
at com.sap.engine.services.dc.lcm.impl.LifeCycleManagerImpl.start(LifeCycleManagerImpl.java:78)
at com.sap.engine.services.dc.cm.deploy.impl.LifeCycleManagerStartVisitor.visit(LifeCycleManagerStartVisitor.java:34)
at com.sap.engine.services.dc.cm.deploy.impl.DeploymentItemImpl.accept(DeploymentItemImpl.java:83)
at com.sap.engine.services.dc.cm.deploy.impl.DefaultDeployPostProcessor.postProcessLCMDeplItem(DefaultDeployPostProcessor.java:91)
at com.sap.engine.services.dc.cm.deploy.impl.DefaultDeployPostProcessor.postProcess(DefaultDeployPostProcessor.java:61)
at com.sap.engine.services.dc.cm.deploy.impl.DeployerImpl.doPostProcessing(DeployerImpl.java:862)
at com.sap.engine.services.dc.cm.deploy.impl.DeployerImpl.performDeploy(DeployerImpl.java:810)
at com.sap.engine.services.dc.cm.deploy.impl.DeployerImpl.doDeploy(DeployerImpl.java:640)
at com.sap.engine.services.dc.cm.deploy.impl.DeployerImpl.deploy(DeployerImpl.java:359)
at com.sap.engine.services.dc.cm.deploy.impl.DeployerImpl.deploy(DeployerImpl.java:248)
at com.sap.engine.services.dc.cm.deploy.impl.DeployerImplp4_Skel.dispatch(DeployerImplp4_Skel.java:897)
at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:355)
at com.sap.engine.services.rmi_p4.server.ServerDispatchImpl.run(ServerDispatchImpl.java:69)
at com.sap.engine.services.rmi_p4.P4Message.process(P4Message.java:67)
at com.sap.engine.services.rmi_p4.P4Message.execute(P4Message.java:41)
at com.sap.engine.services.cross.fca.FCAConnectorImpl.executeRequest(FCAConnectorImpl.java:977)
at com.sap.engine.services.rmi_p4.P4Message.process(P4Message.java:57)
at com.sap.engine.services.cross.fca.MessageReader.run(MessageReader.java:55)
at com.sap.engine.core.thread.execution.Executable.run(Executable.java:109)
at com.sap.engine.core.thread.execution.CentralExecutor$SingleThread.run(CentralExecutor.java:314)
Caused by: com.sap.engine.services.ejb3.container.ActionException: Cannot activate endpoint for message-driven bean com.sap/fxenapjmsEAR*annotation|fxenapjms.jar*annotation|fxenapmjbBean
at com.sap.engine.services.ejb3.runtime.impl.Actions_MDBEndpointActivation.perform(Actions_MDBEndpointActivation.java:94)
at com.sap.engine.services.ejb3.container.CompositeAction.perform(CompositeAction.java:81)
at com.sap.engine.services.ejb3.container.ApplicationStarter.perform(ApplicationStarter.java:59)
at com.sap.engine.services.ejb3.container.ContainerInterfaceImpl$Actions.perform(ContainerInterfaceImpl.java:897)
... 35 more
Caused by: javax.resource.NotSupportedException: javax.resource.spi.UnavailableException: The destination jmsqueues/default/sapDemoQueue cannot be looked up. Last attempt performed : jms_vendor_queues_global/jmsqueues/default/sapDemoQueue
at com.sap.jms.resourceadapter.ResourceAdapterImpl.endpointActivation(ResourceAdapterImpl.java:128)
at com.sap.engine.services.connector.jca15.EndpointActivationImpl.activateEndpoint(EndpointActivationImpl.java:531)
at com.sap.engine.services.connector.jca15.EndpointActivationImpl.findResourceAdapterByName(EndpointActivationImpl.java:155)
at com.sap.engine.services.connector.jca15.EndpointActivationImpl.findAdapter(EndpointActivationImpl.java:86)
at com.sap.engine.services.connector.jca15.EndpointActivationImpl.activateEndpoint(EndpointActivationImpl.java:59)
at com.sap.engine.services.ejb3.runtime.impl.Actions_MDBEndpointActivation.perform(Actions_MDBEndpointActivation.java:84)
... 38 more
Caused by: javax.resource.spi.UnavailableException: The destination jmsqueues/default/sapDemoQueue cannot be looked up. Last attempt performed : jms_vendor_queues_global/jmsqueues/default/sapDemoQueue
at com.sap.jms.resourceadapter.RaActivation.setupDestination(RaActivation.java:361)
at com.sap.jms.resourceadapter.RaActivation.activate(RaActivation.java:126)
at com.sap.jms.resourceadapter.ResourceAdapterImpl.endpointActivation(ResourceAdapterImpl.java:115)
... 43 more
Caused by: com.sap.engine.services.jndi.persistent.exceptions.NameNotFoundException: Path to object does not exist at jmsqueues, the whole lookup name is jms_vendor_queues_global/jmsqueues/default/sapDemoQueue.
at com.sap.engine.services.jndi.implserver.ServerContextImpl.getLastContainer(ServerContextImpl.java:184)
at com.sap.engine.services.jndi.implserver.ServerContextImpl.lookup(ServerContextImpl.java:489)
at com.sap.engine.services.jndi.implclient.ClientContext.lookup(ClientContext.java:321)
at com.sap.engine.services.jndi.implclient.ClientContext.lookup(ClientContext.java:619)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at com.sap.jms.resourceadapter.RaActivation.setupDestination(RaActivation.java:359)
... 45 moreIt means that bean classes are in the system classpath and therefore
cannot be reloaded. If you do not plan on hot-redeploying your beans
you can ignore this message.
Dragan-Sassler <[email protected]> wrote:
Hi,
i have developed some EJB, that are dependent from each others.
So I set the classpath to a lib-directory with my EJB.
When i try to deploy, i become a warning
<Warning> <EJB> <EJB Deployment: Fnv cannot be redeployed while the server is
running. de.dr_staedtler.extern.audi.fnv.data.ejb.FnvBean is located in the server's
classpath.>
But the EJB's are deployed and the client can connect it.
Why is the warning? It is important or I can ignore it?
Thanks for your time.
dragan-sassler--
Dimitri -
Controlling EJB Cache & Warning BEA-010001 in 8.1
Background: Migrated from 6.1 to 8.1. Using CMP with template.j modified (migrated).
Problem:
1. Could not use any Entities which uses Entity Cache. It throws weblogic.ejb20.cache.CacheFullException
during ejbLoad. My existing Cache parameters are (anyway, it is no different from
6.1 where itz working fine)
<pool>
<max-beans-in-free-pool>100</max-beans-in-free-pool>
</pool>
<entity-cache>
<max-beans-in-cache>100</max-beans-in-cache>
<idle-timeout-seconds>610</idle-timeout-seconds>
<read-timeout-seconds>60</read-timeout-seconds>
<concurrency-strategy>Database</concurrency-strategy>
</entity-cache>
Is there any new configuration which needs to be set for 8.1? Redirection to
some checklist for controlling there cache parameter would be helpful?
2. While deploying my Beans it shows up Warning BEA-010001. Documentation says,
specify in weblogic-ejb-jar.xml<weblogic-ejb-jar> <disable-warning>BEA-010001
| BEA-010054</disable-warning>..</weblogic-ejb-jar>. I have thousands of beans
deployed in the server my warning message dumps my console with these messages
hiding critical error messages. Is there any 'additional parameters' to stop
this warning or route this warning to a separate log file?
TIA
JAKHi Jak,
max-beans-in-cache equal 100 is way too low for any real life application.
I'm not sure why it worked for you in 6.1. I remember setting it was broken
in 6.1 at some point.
Regards,
Slava Imeshev
"jak" <[email protected]> wrote in message
news:3f07e7c9$[email protected]..
>
Background: Migrated from 6.1 to 8.1. Using CMP with template.j modified(migrated).
>
Problem:
1. Could not use any Entities which uses Entity Cache. It throwsweblogic.ejb20.cache.CacheFullException
during ejbLoad. My existing Cache parameters are (anyway, it is nodifferent from
6.1 where itz working fine)
<pool>
<max-beans-in-free-pool>100</max-beans-in-free-pool>
</pool>
<entity-cache>
<max-beans-in-cache>100</max-beans-in-cache>
<idle-timeout-seconds>610</idle-timeout-seconds>
<read-timeout-seconds>60</read-timeout-seconds>
<concurrency-strategy>Database</concurrency-strategy>
</entity-cache>
Is there any new configuration which needs to be set for 8.1? Redirectionto
some checklist for controlling there cache parameter would be helpful?
2. While deploying my Beans it shows up Warning BEA-010001. Documentationsays,
specify in weblogic-ejb-jar.xml<weblogic-ejb-jar><disable-warning>BEA-010001
| BEA-010054</disable-warning>..</weblogic-ejb-jar>. I have thousands ofbeans
deployed in the server my warning message dumps my console with thesemessages
hiding critical error messages. Is there any 'additional parameters' tostop
this warning or route this warning to a separate log file?
TIA
JAK -
Problems clustering a Weblogic Stateful EJB 3.0
Hello!
I'm developing a Stateful EJB 3.0 with clustering configuration for weblogic 11G. My client gets a reference to the RemoteInterface, invoke a method and it's working. Then I shutdown the server where the EJB was created and the client reinvoke (using the same reference) a method and get's this error:
javax.ejb.EJBException: Exception waiting for response; nested exception is:
java.io.EOFException: Connection closed by peer; nested exception is: java.io.EOFException: Connection closed by peer
java.io.EOFException: Connection closed by peer
at weblogic.iiop.EndPointImpl.handleCloseConnection(EndPointImpl.java:602)
at weblogic.iiop.EndPointImpl.processMessage(EndPointImpl.java:545)
at weblogic.iiop.EndPointImpl.handleMessage(EndPointImpl.java:500)
at weblogic.iiop.EndPointImpl.dispatch(EndPointImpl.java:324)
at weblogic.iiop.ConnectionManager.dispatch(ConnectionManager.java:126)
at weblogic.iiop.MuxableSocketIIOP.dispatch(MuxableSocketIIOP.java:302)
at weblogic.socket.BaseAbstractMuxableSocket.dispatch(BaseAbstractMuxableSocket.java:298)
at weblogic.socket.SocketMuxer.readReadySocketOnce(SocketMuxer.java:915)
at weblogic.socket.SocketMuxer.readReadySocket(SocketMuxer.java:844)
at weblogic.socket.JavaSocketMuxer.processSockets(JavaSocketMuxer.java:335)
at weblogic.socket.SocketReaderRequest.run(SocketReaderRequest.java:29)
at weblogic.work.ExecuteRequestAdapter.execute(ExecuteRequestAdapter.java:21)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:145)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:117)
javax.ejb.EJBException: Exception waiting for response; nested exception is:
java.io.EOFException: Connection closed by peer; nested exception is: java.io.EOFException: Connection closed by peer
at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.unwrapRemoteException(RemoteBusinessIntfProxy.java:109)
at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.invoke(RemoteBusinessIntfProxy.java:91)
at $Proxy0.getMas(Unknown Source)
at com.ibermatica.pruebas.pruebaEJB30SF.getPrueba(pruebaEJB30SF.java:79)
at com.ibermatica.pruebas.pruebaEJB30SF.main(pruebaEJB30SF.java:26)
Caused by: java.io.EOFException: Connection closed by peer
at weblogic.iiop.EndPointImpl.handleCloseConnection(EndPointImpl.java:602)
at weblogic.iiop.EndPointImpl.processMessage(EndPointImpl.java:545)
at weblogic.iiop.EndPointImpl.handleMessage(EndPointImpl.java:500)
at weblogic.iiop.EndPointImpl.dispatch(EndPointImpl.java:324)
at weblogic.iiop.ConnectionManager.dispatch(ConnectionManager.java:126)
at weblogic.iiop.MuxableSocketIIOP.dispatch(MuxableSocketIIOP.java:302)
at weblogic.socket.BaseAbstractMuxableSocket.dispatch(BaseAbstractMuxableSocket.java:298)
at weblogic.socket.SocketMuxer.readReadySocketOnce(SocketMuxer.java:915)
at weblogic.socket.SocketMuxer.readReadySocket(SocketMuxer.java:844)
at weblogic.socket.JavaSocketMuxer.processSockets(JavaSocketMuxer.java:335)
at weblogic.socket.SocketReaderRequest.run(SocketReaderRequest.java:29)
at weblogic.work.ExecuteRequestAdapter.execute(ExecuteRequestAdapter.java:21)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:145)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:117)
The description of my test is:
+I have a Weblogic cluster (c1, c2)
+I have developed an 3.0 Stateful EJB (configurated for replication)
+My client gets an EJB Instance from c1 and invoke one method (debugging)
+I stops my client
+I shutdown my server (c1)
+My client invokes another EJB method end gets the error described before.
It seems like the Server don't replicate the EJB.
My replicatión ejb deployment descriptor is (weblogic.xml):
<weblogic-enterprise-bean>
<ejb-name>Session30EJBSFBean</ejb-name>
<stateful-session-descriptor>
<stateful-session-clustering>
<!--<home-is-clusterable>true</home-is-clusterable>
<home-load-algorithm>random</home-load-algorithm>
<replication-type>InMemory</replication-type>-->
<use-serverside-stubs>true</use-serverside-stubs>
<replication-type>InMemory</replication-type>
</stateful-session-clustering>
</stateful-session-descriptor>
</weblogic-enterprise-bean>
My ejb bean class is:
@Stateful(name = "Session30EJBSF", mappedName = "clustering30-cluster301-Session30EJBSF")
@Remote
public class Session30EJBSFBean implements Session30EJBSF {
private SessionContext _context;
private int contador= 0;
private String user="";
public Session30EJBSFBean() {
public void inicio(String user){
this.user= user;
contador=0;
public void mas(){
contador++;
public int getMas(){
return contador;
public String getUser(){
return this.user;
My Remote EJB:
import javax.ejb.Remote;
@Remote
public interface Session30EJBSF {
public void inicio(String user);
public void mas();
public int getMas();
public String getUser();
My client:
public class pruebaEJB30SF {
public pruebaEJB30SF() {
super();
public static void main(String[] args) {
pruebaEJB30SF pruebaEJB30SF = new pruebaEJB30SF();
try {
pruebaEJB30SF.getPrueba();
} catch (Exception e) {
e.printStackTrace();
public Context getInitialContext() throws NamingException {
//String url="t3://c1:8001";
String url="iiop://c1:8001";
String user="any";
String password="any";
Properties p= new Properties();
//p.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.T3InitialContextFactory");
p.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
p.put(Context.PROVIDER_URL,url);
p.put(Context.SECURITY_PRINCIPAL,user);
p.put(Context.SECURITY_CREDENTIALS,password);
return new InitialContext(p);
public void getPrueba() throws NamingException, RemoteException,
CreateException {
// <PROFILING>
Context ctx= getInitialContext();
//2.0 Stateful
Object ref= ctx.lookup("clustering30-cluster301-Session30EJBSF#.Session30EJBSF");
Session30EJBSF home= (Session30EJBSF)PortableRemoteObject.narrow(ref, Session30EJBSF.class);
Session30EJBSF ejb=home;
ejb.inicio("User1");
ejb.mas();
System.out.println( ejb.getMas());// I put here a breakpoint and I shutdown the serer c1
ejb.mas();
System.out.println( ejb.getMas());
ejb.mas();
System.out.println( ejb.getMas());//Caida
ejb.mas();
System.out.println( ejb.getMas());
I have developed a EJB 2.1 and a EJB 2.1 client and it's working. The most important change betwin ejb 3.0 client and my 2.1 client is that in 2.1 I use the getHandle method and a Home, not a Remote.
Please, can anyone help me.
Thanks.Hi,
Please change your Client Code as below: URL must be pointing to the comma Separated address of your ManagedServers Address/Port which are part of Cluster like For Example Suppose you have 2 managedServers in ClusterA ..... t3://MS1Host:8003,MS2Host:8005
public Context getInitialContext() throws NamingException {
<strike><font color=red>String url="t3://c1:8001";</font></strike>
<b>String url="t3://ManagedServer1HostName:port,ManagedServer2HostName:port";</b>
String user="any";
String password="any";
Properties p= new Properties();
p.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
p.put(Context.PROVIDER_URL,url);
p.put(Context.SECURITY_PRINCIPAL,user);
p.put(Context.SECURITY_CREDENTIALS,password);
return new InitialContext(p);
Thanks
Jay SenSharma
http://weblogic-wonders.com/weblogic (WebLogic Wonders Are here) -
Weblogic JMS EJB : ThreadLocal access query : getting null in same thread
We have two applications(one is jms and other is ejb) on single instance of weblogic managed server.
On receving a new jms message the jms application call the ejb application by passing the new xml message.
ejb application creates a threadlocal object and allocated transaction id to this transaction. I want to access this transactionid(present in threadlocal) in my jms application. But i am getting null.
I believe i am in the same thread as i printing the thread number in the both the application log. I verified that same thread number was present for multiple messages
in both logs [Except if one scenario of thread pooling is present that when jms calls ejb it frees the thread(23) and when ejb completes its job if gives back the thread(23) to jms...but it resets thread local]
I need answer to following question
1. Why is my transaction id null when i access through jms application.
2. I believe i am in the same jvm instance.
3. I believe i am in the same thread instance...( looking at logs except if someone can tell me i am not.....)
4. Or if there is alternative solution to pick up threadlocal variable in my jms application.
JMS application is new application trying to connect to existing ejb application which had the thread local design and we want to use that existing architecture before we decide to change. We need the transactionid for log corelation.I assume that either your JMS destination is backed by a database or your application is doing some database operations in the same transaction as the JMS send operation. I suspect that there is some kind of database maintenance process going on every night, which causes the database operations to be slow or not responding, which in turn causes the MDB transaction that the JMS send operation participates in to timeout.
-
Redeploying ejb module error?
Hi all,
I have a file called myejb2.jar that I developed in NetBeans 5.5 as a standalone EJB module. I used NetBeans to delpoy/redeploy it on my App Server v9.0. This works well. However, if I use the redeploy option from the Admin console (ejb modules -> click my module's redeploy link -> specify the path to the jar file), then the old module "myejb2" is undeployed, and a new module named "null" appears instead.
How can I make the "redeploy" link work properly?
thanks,Hi all,
I have a file called myejb2.jar that I developed in NetBeans 5.5 as a standalone EJB module. I used NetBeans to delpoy/redeploy it on my App Server v9.0. This works well. However, if I use the redeploy option from the Admin console (ejb modules -> click my module's redeploy link -> specify the path to the jar file), then the old module "myejb2" is undeployed, and a new module named "null" appears instead.
How can I make the "redeploy" link work properly?
thanks, -
Hi everyone,
I have an CMP bean which has findByName(String). During deployment of the ejb
I tell the bean use the WLQL such as
(like string%), but I would like to pass the name when the user enter in the text
box of the .html page then the user click on search, the servlet is called and
process using ejb technique. If I specified (like Fre%) in the ejb despcriptor
for one particular case( such as looking for all Fred's), it will not work for
the user enters smith.
for example: user enter: Fre in the text box.
I would like to have the bean do the query for me like:
--> select * from user where lastName like Fre%
If I cannot tell in the CDATA field, does that mean I have to use BMP to write
query that takes the name.
Please help,
Thanks in advance.Thanks Jim,
I did exactly like in the example (like Name $0) Name is my cmp field, but this
time it always returns one entity (same entity )regardless what I entered to search
by name. So that means it did not take the parameter that defined in <find-param>
of the weblogic-cmp-rdbm-jar.xml. Do you have any suggestion or idea to overcome
this problem.
Thanks Jim,
Tom
Jim Weaver <[email protected]> wrote:
>
Tom
You can use like with a String parameter in WLQL. There is an example
in our
documentation at
http://www.weblogic.com/docs51/classdocs/API_ejb/EJB_environment.html#1022700
Thanks
Jim
Tom wrote:
Hi everyone,
I have an CMP bean which has findByName(String). During deploymentof the ejb
I tell the bean use the WLQL such as
(like string%), but I would like to pass the name when the user enterin the text
box of the .html page then the user click on search, the servlet iscalled and
process using ejb technique. If I specified (like Fre%) in the ejbdespcriptor
for one particular case( such as looking for all Fred's), it will notwork for
the user enters smith.
for example: user enter: Fre in the text box.
I would like to have the bean do the query for me like:
--> select * from user where lastName like Fre%
If I cannot tell in the CDATA field, does that mean I have to use BMPto write
query that takes the name.
Please help,
Thanks in advance.Content-Description: Card for Jim Weaver
begin:vcard
n:Weaver;Jim
x-mozilla-html:FALSE
org:BEA Systems Inc.
adr:;;.;;;;
version:2.1
email;internet:[email protected]
title:Developer Relations Engineer
fn:Jim Weaver
end:vcard -
Weblogic security & EJB role based access
How does (or not) weblogic security tie into the EJB notion of role based
control ? Can we create a 'custom' security mechanism for EJB (which
basically uses the EJB facilities but extends it within the application) by
using custom weblogic realms ?
Thanks
RajuThanks !
"Terry" <[email protected]> wrote in message
news:[email protected]...
comments inline
r <[email protected]> wrote in message
news:[email protected]...
>>
Here are some more specific questions around an 'example' scenario:
The application has an entity bean 'Account' that can be accessed by the
roles 'Bank Employee' and 'Customer'
'Bank Employee' can execute the 'getBalance()' and 'placeOnHold()'
methods on the 'Account' bean
'Customer' can execute the 'withdraw()', 'deposit()', and'getBalance()'
methods on the 'Account' bean
These permissions are set up through the deployment descriptor by
mapping
the 'Bank Employee' and 'Customer' roles
to the particular bean methods that the role should be given access to.
1. How does weblogic provide the facility to map the EJB deployment
descriptor
<security-role> to a particular weblogic principal (user orgroup)
Or, should I say, how do I map the user or group to a
deployment-descriptor defined role?In the deployment tool, once in the jar select the 'Security' item,create
an application role (in your case it is probably best to create 2 security
roles - the bank employee role refering to the bank employee group (usethe
'in role' checkboxes, and the customer role refering to the customergroup -
there may at some point be use for an allUsers role, which includes both
groups, maybe not. What I am saying is that a role is made of a one ormore
of Principals - in our case groups)
In the Account Bean select the method permissions item, and create amethod
permission perm-0, select the perm-0 item that has just popped up in the
left hand window, tick the box for placeOnHold(), and the boxes for<remote>
and <home> one level deeper than this in the tree (as an aside, I have
absolutely no idea why there would be a 'home' box here, ho hum). Selectthe
'bank employee' 'can invoke' tickbox
Create perm-1, and do what you did above for 'withdraw()' and 'deposit()'
methods, and the 'customer' tickbox
I believe the documents say you would have to set up another permission to
allow both groups access to the getBalance method, but in practive Ihaven't
found this the case.
The documentation for this is at
http://www.weblogic.com/docs51/classdocs/API_ejb/EJB_deploy.html#1102211
(or
search for 'Deploying EJBs with DeployerTool'
2. Are there any administrative tools provided by weblogic to do
this
mapping ?The deployer tool. Otherwise I think it's the acse of writing your own xml
files
3. How much effort & complexity is involved in creating a custom
realm
Hmmm, depends - you could have the RDBMSRealm that is provided in'examples'
in half an hour or so (there is a problem with one of the RDBMSUser's
methods - getUserType or something like that - the solution can be foundin
the newsgroups if you search), the same is probably true of the LDAPRealm,
NTRealm etc (although I have never used these).
Which one you choose depends on what equipment you have available,although
I would say that the RDBMSRealm canuse a lot of optimisation
Thanks,Welcome
Raju
"Terry" <[email protected]> wrote in message
news:[email protected]...
The Principals (i.e. groups and users) from your custom realm are used
to
define application roles for the EJBs, but, as far as I am aware youcannot
use a custom implementation for the ACLs for EJBs
terry
r <[email protected]> wrote in message
news:[email protected]...
How does (or not) weblogic security tie into the EJB notion of rolebased
control ? Can we create a 'custom' security mechanism for EJB (which
basically uses the EJB facilities but extends it within the
application)
by
using custom weblogic realms ?
Thanks
Raju -
WARNING: EJB5184:A system exception occurred during an invocation on EJB TimerBean, method: public void com.as.TimerBean.myTimer()
WARNING: javax.ejb.TransactionRolledbackLocalException: Client's transaction aborted
at com.sun.ejb.containers.BaseContainer.useClientTx(BaseContainer.java:4722)
at com.sun.ejb.containers.BaseContainer.preInvokeTx(BaseContainer.java:4601)
at com.sun.ejb.containers.BaseContainer.preInvoke(BaseContainer.java:1914)
at com.sun.ejb.containers.BaseContainer.callEJBTimeout(BaseContainer.java:4055)
at com.sun.ejb.containers.EJBTimerService.deliverTimeout(EJBTimerService.java:1832)
at com.sun.ejb.containers.EJBTimerService.access$100(EJBTimerService.java:108)
at com.sun.ejb.containers.EJBTimerService$TaskExpiredWork.run(EJBTimerService.java:2646)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
How i can solve the issue
Applicaion server is GlassFishFind the cause, and fix it. That is not going to be easy and nobody is going to be able to do it for you.
The only thing I can offer is that there are two likely sources:
a) an exception occurred somewhere which caused the transaction to become aborted/rolled back
b) there was a transaction timeout
Normally I would put my money on a), but if you check the stacktrace I just happen to spot "callEJBTimeout" in there.Perhaps your timer task is doing something that takes too long? -
Redeployment - EJBs on Classpath
I'm using wls 8.1. I have an EAR in which several EJB are loaded from the system
classpath. After redeployment, these EJB's are not available.
java.rmi.NoSuchObjectException: Bean is already undeployed
I would have expected not to be able to affect any change in such EJBs via redeployment,
but that redeployment would be successful. The console shows that redeployment
for these EJBs is successful (i.e., status: active). Do these classes have to
be off the classpath for redeployment to work properly? Why doesn't the console
report their status correctly? Thanks...
..BrianRob Woollen <[email protected]> wrote:
Brian wrote:
Rob Woollen <[email protected]> wrote:
I believe you are right. Unfortunately the calling application isnot really
a client but the security provider. So, I've put everything our realmcode needs
on the server's classpath. I've also tried taking it off the classpathand putting
it in the providers.jar, but no joy. In that case, a ClassCast exceptionis thrown
on the narrow. So, my problem seems to be that I don't know how tohandle the
situation where my login module makes EJB calls. Is there any wayto refresh
the providers.jar?Does your security provider cache the EJB stub? I believe if you
re-lookup the home in JNDI and get a new stub that it should work fine
without refreshing the providers.jar (assuming the new EJB didn't change
the interface.)
Yes, I am (was) caching the stub. Yes, re-looking up the home cures the problem.
Thanks.
-- Rob
Thanks...
..Brian
-- Rob
I would have expected not to be able to affect any change in such
EJBs
via redeployment,
but that redeployment would be successful. The console shows that
redeployment
for these EJBs is successful (i.e., status: active). Do these classeshave to
be off the classpath for redeployment to work properly? Why doesn'tthe console
report their status correctly? Thanks...
..Brian -
OC4J's servlet and Weblogic's EJB problem
Hi all,
Is it possible to look up the weblogic.jndi.WLInitialContextFactory from servlet deployed into OC4J ?
I copied weblogic.jar and MyEJB.jar to \j2ee\home\lib and re-started OC4J.
When the servlet runs for the first time, I can see the following displayed:
java.lang.InternalError: error initializing kernel
at weblogic.kernel.Kernel.ensureInitialized(Kernel.java:86)
at weblogic.jndi.WLInitialContextFactoryDelegate.<init>(WLInitialContextFactoryDelegate.java:166)
at java.lang.Class.newInstance0(Native Method)
at java.lang.Class.newInstance(Unknown Source)
at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:147)
at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.init(Unknown Source)
at javax.naming.InitialContext.<init>(Unknown Source)
at myServlet.doGet(myServlet.java:41)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:195)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:309)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
at com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:684)
at com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:269)
at com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:735)
at com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.http.HttpRequestHandler.run(HttpRequestHandler.java:243)
at com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].util.ThreadPoolThread.run(ThreadPoolThread.java:64)
Next time servlet's response is as follows:
500 Internal Server Error
weblogic.common.internal.VersioningError: No WebLogic packages defined in CLASSPATH
at weblogic.common.internal.VersionInfo.<init>(VersionInfo.java:39)
at weblogic.common.internal.VersionInfo.initialize(VersionInfo.java:77)
at weblogic.common.internal.VersionInfo.theOne(VersionInfo.java:63)
at weblogic.rjvm.t3.T3JVMConnection.connect(T3JVMConnection.java:106)
at weblogic.rjvm.t3.T3JVMConnection.createConnection(T3JVMConnection.java:164)
at weblogic.rjvm.Protocol.createConnection(Protocol.java:206)
at weblogic.rjvm.ConnectionManager.findOrCreateConnection(ConnectionManager.java:999)
at weblogic.rjvm.ConnectionManager.bootstrap(ConnectionManager.java:285)
at weblogic.rjvm.ConnectionManager.bootstrap(ConnectionManager.java:242)
at weblogic.rjvm.RJVMManager.findOrCreateRemoteInternal(RJVMManager.java:220)
at weblogic.rjvm.RJVMManager.findOrCreate(RJVMManager.java:188)
at weblogic.rjvm.RJVMFinder.findOrCreateRemoteServer(RJVMFinder.java:178)
at weblogic.rjvm.RJVMFinder.findOrCreate(RJVMFinder.java:149)
at weblogic.rjvm.ServerURL.findOrCreateRJVM(ServerURL.java:207)
at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:311)
at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:211)
at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:149)
at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.init(Unknown Source)
at javax.naming.InitialContext.<init>(Unknown Source)
at myServlet.doGet(myServlet.java:41)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:195)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:309)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
at com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:684)
at com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:269)
at com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:735)
at com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.http.HttpRequestHandler.run(HttpRequestHandler.java:243)
at com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].util.ThreadPoolThread.run(ThreadPoolThread.java:64)
The 41th line of myServlet.java is as follows:
Context jndiContext = new InitialContext(env);
OC4J and Weblogic ara installed on the different computers.
The same myServlet.class deployed into other Weblogic (installed on the same computer as OC4J) works correctly.
What I did miss ?
SY,
Oleksandr Bozhykyes....if you are using only hibernate3.jar and no other jars from hibernate then you need this jars for hibernate to work.
antlr-2.7.6rc1.jar
asm.jar
asm-attrs.jar
cglib-2.1.3.jar
commons-collections-2.1.1.jar
commons-logging-1.0.4.jar
dom4j-1.6.1.jar
ehcache-1.1.jar
hibernate3.jar
jaas.jar
jaxen-1.1-beta-7.jar
jdbc2_0-stdext.jar
jta.jar
log4j-1.2.11.jar
ojdbc14.jar
xerces-2.6.2.jar
xml-apis.jar
if you are missing any of those, hibernate won't work.
You can check in MyEclipse which jars hibernate needs to run successfully. Just go under Window/Preferences, and there go under MyEclipse/Project Capabilities/Hibernate and select tab Hibernate 3.1 and under Library modules select Hibernate 3.1 Core Libraries, and you will see which jars hibernate need. ;) -
Connect DatSource in weblogic with EJB
i have problem while i try to run my ADF application in stan alone weblogic server ,
the application is run successfully but when it connect to data base the following error is appear :
Exception [EclipseLink-7060] (Eclipse Persistence Services - 1.2.0.v20091016-r55
65): org.eclipse.persistence.exceptions.ValidationException
Exception Description: Cannot acquire data source [java:/app/jdbc/jdbc/SignUpDS]
can you help me please .i have problem while i try to run my ADF application in stan alone weblogic server ,
the application is run successfully but when it connect to data base the following error is appear :
Exception [EclipseLink-7060] (Eclipse Persistence Services - 1.2.0.v20091016-r55
65): org.eclipse.persistence.exceptions.ValidationException
Exception Description: Cannot acquire data source [java:/app/jdbc/jdbc/SignUpDS]
can you help me please .
Maybe you are looking for
-
Is there a way to restore text messages back to my iPhone 5s version 7.1.1? I have several text messages that have been deleted somehow and I would like to restore them to my phone. I have tried restoring it from the last backup and that did not hel
-
My computer has been turned off for almost a year. When reconnecting, refreshing, updating, etc, everything that needs to be done on the computer, i come across the problem of firefox acting as though I did not update anything. I've followed all the
-
Changes to an order through Call Transaction not showing up in change log
I m having a problem such that if I update an order programmatically with Call Transaction u2018VA02u2019, the order does get updated updated but I donu2019t see the changes in the change log. I m only updating the order quantities. However if I upda
-
Why do I not have sund on videos/YouTube?
I have no sound when trying to watch a YouTube video or a video I have recorded. The volume is all the way up.
-
How to install locator on iphone
how do I intall locator on my sons iphone so I can track were he is