Ejb on weblogic7
Hi ,
I am deploying a simple webservice (with an entity bean) on weblogic 7 from my own directory(for eg :- C:/test) .
To compile ejb classes and generate ejb-jar , ear files , I am using ANT . While compiling the ejb classe , i am
encountering the following error :
1. ERROR: ejbc found errors while parsing the descriptor for HelloEntity.jar:
ERROR: Error from ejbc: Error parsing 'META-INF/weblogic-ejb-jar.xml' line 2: Wh
ite space is required between "PUBLIC" and the public identifier.
2. Unable to Locate bean HelloEntityBean(entity bean) .
Can anybody help ??
thanks
I am running the ANT from my staging directory(for eg : c:\test) . I have set the classpath which points to \\bea\weblogic700\server\lib . This is where the weblogic.jar is present . But i still get the error :
ejb:
[mkdir] Created dir: C:\Test\build
[mkdir] Created dir: C:\Test\build\META-INF
[copy] Copying 5 files to C:\Test\build\META-INF
[javac] Compiling 3 source files to C:\Test\build
[jar] Building jar: C:\Test\HelloEntity.jar
[java]
[java] ERROR: Error from ejbc: null
[java]
[java] java.lang.NullPointerException
[java] at weblogic.ejb20.deployer.CompositeMBeanDescriptor.getPersisten
ceUseIdentifier(CompositeMBeanDescriptor.java:1389)
[java] at weblogic.ejb20.deployer.CMPInfoImpl.<init>(CMPInfoImpl.java:1
05)
[java] at weblogic.ejb20.deployer.EntityBeanInfoImpl.<init>(EntityBeanI
nfoImpl.java:135)
[java] at weblogic.ejb20.deployer.BeanInfoImpl.createBeanInfoImpl(BeanI
nfoImpl.java:335)
[java] at weblogic.ejb20.deployer.MBeanDeploymentInfoImpl.initializeBea
nInfos(MBeanDeploymentInfoImpl.java:429)
[java] at weblogic.ejb20.deployer.MBeanDeploymentInfoImpl.<init>(MBeanD
eploymentInfoImpl.java:164)
[java] at weblogic.ejb20.ejbc.EJBCompiler.setupEJB(EJBCompiler.java:154
[java] at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:3
84)
[java] at weblogic.ejbc20.runBody(ejbc20.java:464)
[java] at weblogic.utils.compiler.Tool.run(Tool.java:126)
[java] at weblogic.ejbc.main(ejbc.java:21)
[java]
[java]
[java] ERROR: ejbc found errors
[java]
[java] at weblogic.ejbc20.formatErrorsInCollection(ejbc20.java:578)
[java] at weblogic.ejbc20.runBody(ejbc20.java:467)
[java] at weblogic.utils.compiler.Tool.run(Tool.java:126)
[java] at weblogic.ejbc.main(ejbc.java:21)
[java] Exception in thread "main"
[java] Java Result: 1
ear:
[servicegen] Generating service "HelloEntity" ...
[servicegen] Generating XML types and serializers from ejb-jar (C:\Test\HelloEnt
ity.jar) ...
[servicegen] Building jar: C:\DOCUME~1\sapna1\LOCALS~1\Temp\hello_ws_basic_state
lessSession.ear7285856\hello_basic_statelessSession.war
[servicegen] Copying 1 file to C:\DOCUME~1\sapna1\LOCALS~1\Temp\hello_ws_basic_s
tatelessSession.ear7285856
[servicegen] Generating client jar for hello_ws_basic_statelessSession.ear728585
6(HelloEntity) ...
[servicegen] Could not read Web Service deployment descriptor
Where could i be going wrong ???
thanks...
Similar Messages
-
hi
i need to know the steps involved in the deployment of a EJB in Weblogic 7.0.
could any one explain the steps with an example i.e starting from creation of all the interfaces, creation of deployment descriptor with example i.e structure of file, creation of jar file with example and then deployment.
sujithHi Sujith,
Get the sample examples in bea\weblogic700\samples\server\src\examples\ejb20 folder.
Create a jar or war or ear file from the java files given in the folders.
Deploy the same in ur WLS Console.
Run the client program to test the same.
Seetesh -
FindByPrimaryKey Exception Found
I'm develop EJBs using weblogic7 and jbuilder7.When I write a
stateless session bean to call a CMP entity bean,weblogic console show the following
message:
"FinderException :Probleam in findByPrimaryKey
while preparing or executing statment: 'weblogic.jdbc.rmi.
SerialPreparedStatement@1d2c12':
java.sql.SQLException: No data found.
I use sql Server 2000,and the table has some data. I am sure
that the data I want to fetch is exist at sql server 2000.
I can not find the way to process this problem.
I'm listening from yours....You'll need to ensure that your session bean is passing in the correct pk information to
the cmp bean. Try putting some simple debug statements in your session bean, before the
call to the cmp bean, and make sure you're passing the correct key. Also make sure that
you're pointing to the correct data base instance, etc.
Regards,
Glenn Dougherty
BEA Technical Support
torry wrote:
I'm develop EJBs using weblogic7 and jbuilder7.When I write a
stateless session bean to call a CMP entity bean,weblogic console show the following
message:
"FinderException :Probleam in findByPrimaryKey
while preparing or executing statment: 'weblogic.jdbc.rmi.
SerialPreparedStatement@1d2c12':
java.sql.SQLException: No data found.
I use sql Server 2000,and the table has some data. I am sure
that the data I want to fetch is exist at sql server 2000.
I can not find the way to process this problem.
I'm listening from yours.... -
Plz help me how to deploy ejb's 3.0 in weblogic7.0 version
hi
how to deploy ejb's3.0 in weblogic7.0 version.i know only deploy ejb2.0 in weblogic 7.0. same procedure or any change.Fire up the administrative console and login.
http://localhost:7001/console
In the left hand pane, expand Deployments and click on EJB Modules. You will see a link saying "Deploy a new EJB Module...", browse to your EJB JAR (I hope you know how to create one for your application) and select Target Module. If everything is okay, the EJB will get deployed. -
Weblogic7/examples/clustering/ejb Automatic failover for idempotent methods ?
This one should be easy since it is from the examples folder of bea 7 about
clustering.
Ref : \bea7\weblogic007\samples\server\src\examples\cluster\ejb
I am referring to the cluster example provided with the weblogic server 7.0
on windows 2000.
I deployed Admin server and 2 managed server as described in document.
Everything works fine as shown by the example. I get load balancing and
failover both. Too Good.
Client.java is using the while loop to manage the failover. So on exception
it will go thru the loop again.
I understand from the documentation that the stateless session EJB will
provide the automatic failover for Idempotent stateless bean
Case Failover Idempotent : ( Automatic )
If methods are written in such a way that repeated calls to the same method
do not cause duplicate updates, the method is said to be "idempotent." For
idempotent methods, WebLogic Server provides the
stateless-bean-methods-are-idempotent deployment property. If you set this
property to "true" in weblogic-ejb-jar.xml, WebLogic Server assumes that the
method is idempotent and will provide failover services for the EJB method,
even if a failure occurs during a method call.
Now I made 2 changes to the code.
1 . I added as follows to the weblogic-ejb-jar.xml of teller stateless EJB
<stateless-clustering>
<stateless-bean-is-clusterable>true</stateless-bean-is-clusterable>
<stateless-bean-load-algorithm>random</stateless-bean-load-algorithm>
<stateless-bean-methods-are-idempotent>true</stateless-bean-methods-are-idem
potent>
</stateless-clustering>
So I should get the automatic failover .............
2. Also I added the break statement in the catch on line around 230 in
Client .java
catch (RemoteException re) {
System.out.println(" Error: " + re);
// Replace teller, in case that's the problem
teller = null;
invoke = false;
break;
So that the client program does not loop again and again.
Now I compile and restart all my three servers and redeploy application (
just to be sure )
I start my client and I get a automatic load balancing between the server
which makes me happy.
But Failover ....?
I kill one of the managed application server in cluster at any particular
test fail point.
I expect the exception to be taken care automatically by error/failover
handler in the home/remote stub
But the client program fails and terminates.
1. What is wrong with the code ?
2. Does the automatic failover with the indempotent methods also has to be
taken care by coding the similar while loop for stateless ejb ?
Your help will be appreciated ASAP.
Let me know if you need any thing more from my system. But I am sure this
will be very easy as it is from the sample code.........
Thanks
Sorry I meant to send this to the ejb newsgroup.
dan
dan benanav wrote:
> Do any vendors provide for clustering with automatic failover of entity
> beans? I know that WLS does not. How about Gemstone? If not is there
> a reason why it is not possible?
>
> It seems to me that EJB servers should be capable of automatic failover
> of entity beans.
>
> dan
-
Weblogic7.0,DataSource,ejb
Hi all ,
I am using weblogic 7.0
I need little bit clarification in the following points.
1) Does the connection pool which is created can be displayed in JNDI Tree???
I am seeing only DataSOurce in the JNDI Tree Only.
2)In case of Bean Managed Persistance, in ejb-jar.xml,
I had given the following info.
<resource-ref>
<res-ref-name>ramukkDataSource</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
Does the <res-ref-name> refers to Datasource Name??
In weblogic-ejb-jar.xml
<reference-descriptor>
<resource-description>
<res-ref-name>ramukkDataSource</res-ref-name>
<jndi-name>ramukkpool</jndi-name>
</resource-description>
</reference-descriptor>
Here <jndi-name> refers to connection pool as per weblogic bible book.
If so when i deployed my ejb into the server iam getting Datasource cant be found.
If i had given like the following,
In ejb-jar.xml
<resource-ref>
<res-ref-name>jdbc/ramuJndi</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
In weblogic-ejb-jar.xml
<reference-descriptor>
<resource-description>
<res-ref-name>jdbc/ramuJndi</res-ref-name>
<jndi-name>jdbc/ramuJndi</jndi-name>
</resource-description>
</reference-descriptor>
Then only my ejb code is successfully deploying doing some work which is as per xpectation.
Can any body tell why I have to give the same name for <res-ref-name> n <jndi-name>??
I am working on this problem from last one week. Still not found the solution.
Connection Pool Creation
GENERAL::
Name : ramukkpool
url : jdbc:mysql://localhost:3306/test
Driver Classname: com.mysql.jdbc.Driver
Properties :
user = root
Password = XXX
createTARGETS::
i had shifted myServer from left side to right side n clicked >>Apply
(Techncially can we say this as deploying the connection pool into server ???????????
If not how to deploy the connection pool into server??)
I did not get any errors in the console.
Now i am creating a datasource
CONFIGURATION:
Name : ramukkDataSource
JNDIName: jdbc/ramuJndi(Does we have to follow this convention only?? i.e JNDIName should start with jdbc/ only)
PoolName: ramukkpool
createTARGETS::
I had shifed myServer from left to right n >>Apply.
Now also i did not get any errors in the console.
Thanx(in advance),
ramuHi Sujith,
Get the sample examples in bea\weblogic700\samples\server\src\examples\ejb20 folder.
Create a jar or war or ear file from the java files given in the folders.
Deploy the same in ur WLS Console.
Run the client program to test the same.
Seetesh -
How to deploy ejb's in weblogic7.0 version
Hi all,
Am new to EJB. I installed BEA weblogic 7.0 in "D:\bea" folder. Now I want to deploy my EJBs into weblogic server. May I know what are the steps for deploying beans into server? And what are the variables that are to be set up like path and classpath?
Thanks in advance.Fire up the administrative console and login.
http://localhost:7001/console
In the left hand pane, expand Deployments and click on EJB Modules. You will see a link saying "Deploy a new EJB Module...", browse to your EJB JAR (I hope you know how to create one for your application) and select Target Module. If everything is okay, the EJB will get deployed. -
Error in deploying ejb in winXP
Hello,
I am not able to deploy any ejb application using weblogic7 in winxp,which i did suceefully in win2000 system.Does xp support weblogic. .I am getting the following errors.
D:\stateless>java weblogic.ejbc slsb.jar
Exception in thread "main" java.io.InvalidClassException: javax.management.MBean
AttributeInfo; local class incompatible: stream classdesc serialVersionUID = 704
3855487133450673, local class serialVersionUID = 8644704819898565848
at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:519)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:154
6)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1460)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:154
6)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1460)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:154
6)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1460)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1
693)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1628)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1293)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:19
12)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1836)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1
713)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)
at weblogic.management.internal.Helper.getMBeanInfo(Helper.java:245)
at weblogic.management.internal.DynamicMBeanImpl.<init>(DynamicMBeanImpl
.java:184)
at weblogic.management.internal.DynamicMBeanImpl.<init>(DynamicMBeanImpl
.java:167)
at weblogic.management.descriptors.XMLElementMBeanDelegate.<init>(XMLEle
mentMBeanDelegate.java:67)
at weblogic.management.descriptors.XMLElementMBeanDelegate.<init>(XMLEle
mentMBeanDelegate.java:51)
at weblogic.management.descriptors.BaseXMLElementMBeanImpl.<init>(BaseXM
LElementMBeanImpl.java:8)
at weblogic.management.descriptors.toplevel.EJBDescriptorMBeanImpl.<init
(EJBDescriptorMBeanImpl.java:94)at weblogic.ejb20.dd.xml.DDUtils.processEjbJarXML(DDUtils.java:210)
at weblogic.ejb20.dd.xml.DDUtils.createDescriptorFromJarFile(DDUtils.jav
a:103)
at weblogic.ejb20.dd.xml.DDUtils.createDescriptorFromJarFile(DDUtils.jav
a:88)
at weblogic.ejbc20.getDescriptorFromJar(ejbc20.java:655)
at weblogic.ejbc20.runBody(ejbc20.java:419)
at weblogic.utils.compiler.Tool.run(Tool.java:126)
at weblogic.ejbc.main(ejbc.java:21)
--------------- nested within: ------------------
weblogic.management.configuration.ConfigurationException: - with nested excepti
on:
[java.io.InvalidClassException: javax.management.MBeanAttributeInfo; local class
incompatible: stream classdesc serialVersionUID = 7043855487133450673, local cl
ass serialVersionUID = 8644704819898565848]
at weblogic.management.internal.Helper.getMBeanInfo(Helper.java:250)
at weblogic.management.internal.DynamicMBeanImpl.<init>(DynamicMBeanImpl
.java:184)
at weblogic.management.internal.DynamicMBeanImpl.<init>(DynamicMBeanImpl
.java:167)
at weblogic.management.descriptors.XMLElementMBeanDelegate.<init>(XMLEle
mentMBeanDelegate.java:67)
at weblogic.management.descriptors.XMLElementMBeanDelegate.<init>(XMLEle
mentMBeanDelegate.java:51)
at weblogic.management.descriptors.BaseXMLElementMBeanImpl.<init>(BaseXM
LElementMBeanImpl.java:8)
at weblogic.management.descriptors.toplevel.EJBDescriptorMBeanImpl.<init
(EJBDescriptorMBeanImpl.java:94)at weblogic.ejb20.dd.xml.DDUtils.processEjbJarXML(DDUtils.java:210)
at weblogic.ejb20.dd.xml.DDUtils.createDescriptorFromJarFile(DDUtils.jav
a:103)
at weblogic.ejb20.dd.xml.DDUtils.createDescriptorFromJarFile(DDUtils.jav
a:88)
at weblogic.ejbc20.getDescriptorFromJar(ejbc20.java:655)
at weblogic.ejbc20.runBody(ejbc20.java:419)
at weblogic.utils.compiler.Tool.run(Tool.java:126)
at weblogic.ejbc.main(ejbc.java:21)
--------------- nested within: ------------------
weblogic.management.configuration.ConfigurationError: No MBeanInfo found for MBe
an with name = null, type = EJBDescriptor, Class = weblogic.management.descripto
rs.toplevel.EJBDescriptorMBeanImpl - with nested exception:
[weblogic.management.configuration.ConfigurationException: - with nested except
ion:
[java.io.InvalidClassException: javax.management.MBeanAttributeInfo; local class
incompatible: stream classdesc serialVersionUID = 7043855487133450673, local cl
ass serialVersionUID = 8644704819898565848]]
at weblogic.management.internal.DynamicMBeanImpl.<init>(DynamicMBeanImpl
.java:191)
at weblogic.management.internal.DynamicMBeanImpl.<init>(DynamicMBeanImpl
.java:167)
at weblogic.management.descriptors.XMLElementMBeanDelegate.<init>(XMLEle
mentMBeanDelegate.java:67)
at weblogic.management.descriptors.XMLElementMBeanDelegate.<init>(XMLEle
mentMBeanDelegate.java:51)
at weblogic.management.descriptors.BaseXMLElementMBeanImpl.<init>(BaseXM
LElementMBeanImpl.java:8)
at weblogic.management.descriptors.toplevel.EJBDescriptorMBeanImpl.<init
(EJBDescriptorMBeanImpl.java:94)at weblogic.ejb20.dd.xml.DDUtils.processEjbJarXML(DDUtils.java:210)
at weblogic.ejb20.dd.xml.DDUtils.createDescriptorFromJarFile(DDUtils.jav
a:103)
at weblogic.ejb20.dd.xml.DDUtils.createDescriptorFromJarFile(DDUtils.jav
a:88)
at weblogic.ejbc20.getDescriptorFromJar(ejbc20.java:655)
at weblogic.ejbc20.runBody(ejbc20.java:419)
at weblogic.utils.compiler.Tool.run(Tool.java:126)
at weblogic.ejbc.main(ejbc.java:21)This exception is because there are 2 different versions of your class.
Whenever there is a change in the class properties or attributes,
but server is using the old class file and in the jar file there is a change in class, so you get this InvalidClassException since there is a different version of class on server. -
Problem: call EJB by ejblocalhome
1.Environment:Jbuilder8/Weblogic7.0
2.Name of EJB2.0 designer of JBuider8 :EJBBusiness
3.Name of stateless session EJB:BaseInfoNotify
4.the EJB includes
BaseInfoNotifyBean.java
BaseInfoNotifyLocal.java
BaseInfoNotifyLocalHome.java
5.local home jndi name is:BaseInfoNotifyLocal.
6.I deploy the EJB by Jbuilder automatically.
Then I want to access the EJB throuth a servlet by the following code:
Context context = new InitialContext();
baseInfoNotifyLocalHome = (BaseInfoNotifyLocalHome)context.lookup("BaseInfoNotifyLocal");
exceptions:
javax.naming.LinkException: . Root exception is javax.naming.NameNotFoundExcept
ion: Unable to resolve 'app/ejb/EJBBusiness.jar#BaseInfoNotify/local-home' Resol
ved: 'app/ejb' Unresolved:'EJBBusiness.jar#BaseInfoNotify' ; remaining name 'EJB
Business.jar#BaseInfoNotify/local-home'
at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(Basic
NamingNode.java:858)
at weblogic.jndi.internal.BasicNamingNode.lookupHere(BasicNamingNode.jav
a:223)
at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:18
7)
at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:19
5)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:338)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:333)
at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:19
7)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:338)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:333)
at weblogic.jndi.factories.java.ReadOnlyContextWrapper.lookup(ReadOnlyCo
ntextWrapper.java:36)
Why is Unresolved:'EJBBusiness.jar#BaseInfoNotify' ???????????i have the same problem!
i create a sessionbean with local home,
i call it with an other sessionbean in a same jar,that's ok!but i call it with a jsp file ,throw errs!
why?
how can i get a locahome outside a jar?
thank you very much! -
Mqseries with weblogic7.0
Currently i have the requirement of connecting MqSeries with weblogic7.0
server . looking thro the edocs , I cannot figure out how to configure the
jms adapter(xml files in the jms-xa-adp.rar file) to use the mqseries .
Is it the way to do ? or is there some other way ?
I have looked at the wlmqseries.zip file at the dev2dev site also , but it
does not help very much.
Does anybody have a step by step configuration example to integrate mqseries
with WLS7.0 using messaging bridge? atleast some guidance would help .
hoping to hear from u guys .
-Gowda
Please see comments in line.
"golibaar" <[email protected]> wrote in message
news:[email protected]...
>
> Currently i have the requirement of connecting MqSeries with weblogic7.0
> server . looking thro the edocs , I cannot figure out how to configure the
> jms adapter(xml files in the jms-xa-adp.rar file) to use the mqseries .
You have to deploy the adapter through the console or in the
config.xml. The way to deploy the adapters are the same as you deploy any
Connector adapters. Please refer to the Connector doc. Or check out
"Deployingthe Bridge Adapters" section in the
following link:
http://e-docs.beasys.com/wls/docs70/adminguide/msgbridge.html#1047954
You have to configure two JMS Bridge Destinations (for the
destination on the WebLogic side and MQSeries side repectively)
and one Messaging bridge. You can find detailed information in the
e-doc given above.
> Is it the way to do ? or is there some other way ?
The messaging bridge automatically transfer messages from one destination to
another. If you just want a WebLogic EJB to read
messages from MQSeries destinations, you can use MDB.
http://e-docs.beasys.com/wls/docs70/ejb/message_beans.html#1050867
> I have looked at the wlmqseries.zip file at the dev2dev site also , but it
> does not help very much.
>
> Does anybody have a step by step configuration example to integrate
mqseries
> with WLS7.0 using messaging bridge? atleast some guidance would help .
>
By the way, there is a white paper to be published soon in dev2dev for
integration of 3rd party messaging products with WebLogic Server.
Hope this helps.
Dongbo
-
Hi,
when I try to deploy a session bean (stateless) on Oracle8i 8.1.7 using jDeveloper 3.2.2 i have the following message:
error: loadJava has failed to load some classes; Please check trace file!
*** Errors occurred while deploying the EJB to 8i JVM ***
*** Deployment completed ***
The instruction that generate error is
dbf = DocumentBuilderFactory.newInstance
Can you help me?
Thank you.
Marco
Session Bean:
public class PresenzeEJBBean implements SessionBean
public PresenzeEJBBean()
public void ejbCreate() throws CreateException
// TODO: Add custom implementation.
public void ejbActivate()
public void ejbPassivate()
public void ejbRemove()
public void setSessionContext(SessionContext ctx)
public java.lang.String getPresenze(String p_user, String p_data_ini, String p_data_end) throws SQLException,RemoteException
java.lang.String ls_ret
// Documento XML
org.w3c.dom.Document l_XMLDocument = null;
// Nodo
org.w3c.dom.Node lRootNode = null;
DocumentBuilderFactory dbf;
dbf = DocumentBuilderFactory.newInstance
return ls_ret;You can't in 7.0. All the EJBs are loaded in the same classloader.
-- Rob
Manikyala wrote:
Hi,
I have ejb jars inside an ear. I want to deploye and undeploy individually each ejb from the ear. How to do it in weblogic7.0.
Thanks
Manikyala -
ConcurrentModificationException on remove call on an ejb
Hi guys,
I'm using weblogic7.0 sp1 and developping with JBuilder8.
The following error appear when i try to remove an ejb. I'm iterating on an
collection of primary key and i try to remove all ejb of this collection
(source code at the bottom).
The same source code is running on weblogic6.1sp2, have you already see this
problem somewhere? Do you know if it's a programming error or an other
thing?
<Mar 19, 2003 10:25:54 AM CET> <Error> <T3Services> <000000> <M&H BOE Engine
ERROR :
java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.next(HashMap.java:731)
at
weblogic.ejb20.internal.TxManager.flushModifiedBeans(TxManager.java:292)
at
weblogic.ejb20.manager.BaseEntityManager.flushModifiedBeans(BaseEntityManage
r.java:1626)
at
weblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.flushModifiedBeans(RDBMSPer
sistenceManager.java:1945)
at
weblogic.ejb20.manager.BaseEntityManager.cascadeDeleteRemove(BaseEntityManag
er.java:1202)
at weblogic.ejb20.manager.DBManager.remove(DBManager.java:1024)
at
weblogic.ejb20.internal.EntityEJBLocalObject.remove(EntityEJBLocalObject.jav
a:102)
at
com.mh.app.boe.engine.dba.instanceprocess.InstanceProcessBean_n65kai_ELOImpl
.remove(InstanceProcessBean_n65kai_ELOImpl.java:1015)
at
com.mh.app.boe.engine.model.EngineWorker.removeProcess(EngineWorker.java:513
at
com.mh.app.boe.engine.model.EngineWorker.modifyProcesses(EngineWorker.java:4
57)
at
com.mh.app.boe.engine.model.EngineWorker.dealEvent(EngineWorker.java:280)
at
com.mh.app.boe.engine.model.EngineWorker.dealEvent(EngineWorker.java:226)
at
com.mh.app.boe.engine.model.EngineWorker.progressInstanceByStep(EngineWorker
.java:402)
at
com.mh.app.boe.engine.model.EngineWorker.progressInstance(EngineWorker.java:
303)
at
com.mh.app.boe.engine.model.EngineWorker.dealEvent(EngineWorker.java:284)
at
com.mh.app.boe.engine.model.EngineWorker.dealEvent(EngineWorker.java:226)
at
com.mh.app.boe.engine.model.EngineWorker.dealEvent(EngineWorker.java:205)
at
com.mh.app.boe.engine.model.EngineBean.dealEvent(EngineBean.java:89)
at
com.mh.app.boe.engine.model.EngineBean_yehaoy_ELOImpl.dealEvent(EngineBean_y
ehaoy_ELOImpl.java:99)
at
com.mh.app.boe.engine.net.EngineControllerEJBBean.dealEvent(EngineController
EJBBean.java:74)
at
com.mh.app.boe.engine.net.EngineControllerEJBBean_agu4tb_EOImpl.dealEvent(En
gineControllerEJBBean_agu4tb_EOImpl.java:262)
at
com.mh.app.boe.engine.net.EngineControllerEJBBean_agu4tb_EOImpl_WLSkel.invok
e(Unknown Source)
at
weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:362)
at
weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java
:114)
at
weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:313)
at
weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManage
r.java:821)
at
weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:308)
at
weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:3
0)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:213)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:189)
>
Collection precedentProcesses =
process.findPrecedentProcesses(processIdToActivate, stateMachineId);
for (Iterator precedentProcessesIterator = precedentProcesses.iterator();
precedentProcessesIterator.hasNext(); ) {
String precedentProcessId = (String) precedentProcessesIterator.next();
InstanceProcessPK instanceProcessPKToPassivate = new
InstanceProcessPK(instance.getInstanceId(),
processIdToPassivate,instance.getStateMachineId());
InstanceProcess instanceProcessToPassivate =
serviceLocator.getInstanceProcessHome().findByPrimaryKey(instanceProcessPKTo
Passivate);
if (instanceProcessToPassivate != null)
instanceProcessToPassivate.remove(); //exception is thows on this
instruction
Thanks in advance,
Joel.Hello Ryan,
There are no other threads of execution that try to access to this
collection of InstanceProcess in my code.
Could it be the application server?
Nota: I 'm using transaction managed by container.
Best regards,
Joel.
"Ryan LeCompte" <[email protected]> wrote in message
news:[email protected]...
>
Hello Joel,
After giving your code a second look, it appears that the Collectionreturned
by your finder method is composed of Strings, and not the actual localinterfaces
of the underlying entity beans. Are you sure that there aren't otherthreads of
execution that are iterating through a collection of InstanceProcesses'while
you are calling the remove() method of the current InstanceProcess in thecode
that you wrote?
Best regards,
Ryan LeCompte
[email protected]
http://www.louisiana.edu/~rml7669
"Ryan LeCompte" <[email protected]> wrote:
Hello Joel,
You should remove your particular bean instance by calling the remove()
method
on the Iterator object as opposed to calling the remove() method directly
on the
local interface of the entity bean. The latter will generate the
ConcurrentModificationException(),
because the underlying collection will be modified while you areiterating
through
it, which generates the exception. This is because thecollection/iterator
is
"fail-safe." Therefore, in your code you would callprecedentProcessesIterator.remove()
instead of instanceProcessToPassivate.remove();
Best regards,
Ryan LeCompte
[email protected]
http://www.louisiana.edu/~rml7669
"Joel Rolland" <[email protected]> wrote:
Hi guys,
I'm using weblogic7.0 sp1 and developping with JBuilder8.
The following error appear when i try to remove an ejb. I'm iterating
on an
collection of primary key and i try to remove all ejb of this collection
(source code at the bottom).
The same source code is running on weblogic6.1sp2, have you alreadysee
this
problem somewhere? Do you know if it's a programming error or an other
thing?
<Mar 19, 2003 10:25:54 AM CET> <Error> <T3Services> <000000> <M&H BOE
Engine
ERROR :
java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.next(HashMap.java:731)
at
weblogic.ejb20.internal.TxManager.flushModifiedBeans(TxManager.java:292)
at
weblogic.ejb20.manager.BaseEntityManager.flushModifiedBeans(BaseEntityMana
ge
r.java:1626)
at
weblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.flushModifiedBeans(RDBMSP
er
sistenceManager.java:1945)
at
weblogic.ejb20.manager.BaseEntityManager.cascadeDeleteRemove(BaseEntityMan
ag
er.java:1202)
at weblogic.ejb20.manager.DBManager.remove(DBManager.java:1024)
at
weblogic.ejb20.internal.EntityEJBLocalObject.remove(EntityEJBLocalObject.j
av
a:102)
at
com.mh.app.boe.engine.dba.instanceprocess.InstanceProcessBean_n65kai_ELOIm
pl
..remove(InstanceProcessBean_n65kai_ELOImpl.java:1015)
at
com.mh.app.boe.engine.model.EngineWorker.removeProcess(EngineWorker.java:5
13
at
com.mh.app.boe.engine.model.EngineWorker.modifyProcesses(EngineWorker.java
:4
57)
at
com.mh.app.boe.engine.model.EngineWorker.dealEvent(EngineWorker.java:280)
at
com.mh.app.boe.engine.model.EngineWorker.dealEvent(EngineWorker.java:226)
at
com.mh.app.boe.engine.model.EngineWorker.progressInstanceByStep(EngineWork
er
..java:402)
at
com.mh.app.boe.engine.model.EngineWorker.progressInstance(EngineWorker.jav
a:
303)
at
com.mh.app.boe.engine.model.EngineWorker.dealEvent(EngineWorker.java:284)
at
com.mh.app.boe.engine.model.EngineWorker.dealEvent(EngineWorker.java:226)
at
com.mh.app.boe.engine.model.EngineWorker.dealEvent(EngineWorker.java:205)
at
com.mh.app.boe.engine.model.EngineBean.dealEvent(EngineBean.java:89)
at
com.mh.app.boe.engine.model.EngineBean_yehaoy_ELOImpl.dealEvent(EngineBean
_y
ehaoy_ELOImpl.java:99)
at
com.mh.app.boe.engine.net.EngineControllerEJBBean.dealEvent(EngineControll
er
EJBBean.java:74)
at
com.mh.app.boe.engine.net.EngineControllerEJBBean_agu4tb_EOImpl.dealEvent(
En
gineControllerEJBBean_agu4tb_EOImpl.java:262)
at
com.mh.app.boe.engine.net.EngineControllerEJBBean_agu4tb_EOImpl_WLSkel.inv
ok
e(Unknown Source)
at
weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:362)
at
weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.ja
va
:114)
at
weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:313)
at
weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceMana
ge
r.java:821)
at
weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:308
at
weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java
:3
0)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:213)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:189)
>
Collection precedentProcesses =
process.findPrecedentProcesses(processIdToActivate, stateMachineId);
for (Iterator precedentProcessesIterator =precedentProcesses.iterator();
precedentProcessesIterator.hasNext(); ) {
String precedentProcessId = (String)precedentProcessesIterator.next();
>>>
InstanceProcessPK instanceProcessPKToPassivate = new
InstanceProcessPK(instance.getInstanceId(),
processIdToPassivate,instance.getStateMachineId());
InstanceProcess instanceProcessToPassivate =
serviceLocator.getInstanceProcessHome().findByPrimaryKey(instanceProcessPK
To
Passivate);
if (instanceProcessToPassivate != null)
instanceProcessToPassivate.remove(); //exception is thows on this
instruction
Thanks in advance,
Joel. -
Connecting to weblogic7.0 from iplanet6.0sp2
Hi,
I am trying to lookup an ejb deployed in weblogic7.0 from my web application deployed
on iplanet6.0 sp2 on HP Unix system - both weblogic and iplanet on different servers.
I tired adding the below 2 lines in the obj.conf of iplanet server :
Init fn="load-modules" funcs="wl-proxy,wl-init" shlib="libproxy.sl"Init fn="wl-init"
But when i try to restart the iplanet server,i get the following error :
Error processing obj.conf line 23: init functions are not allowed in this objset
Could anyone help me resolve this?
Thanks
SmithaSUN One Web server is different from I-Planet Web Servers , you need to add the
Init line into magnus.conf file and the objects tags inside object.conf file.
This will solve your problem
"smitha" <[email protected]> wrote:
>
Hi,
I am trying to lookup an ejb deployed in weblogic7.0 from my web application
deployed
on iplanet6.0 sp2 on HP Unix system - both weblogic and iplanet on different
servers.
I tired adding the below 2 lines in the obj.conf of iplanet server :
Init fn="load-modules" funcs="wl-proxy,wl-init" shlib="libproxy.sl"Init
fn="wl-init"
But when i try to restart the iplanet server,i get the following error
Error processing obj.conf line 23: init functions are not allowed in
this objset
Could anyone help me resolve this?
Thanks
Smitha -
1.Environment:Jbuilder8/Weblogic7.0
2.Name of EJB2.0 designer of JBuider8 :EJBBusiness
3.Name of stateless session EJB:BaseInfoNotify
4.the EJB includes
BaseInfoNotifyBean.java
BaseInfoNotifyLocal.java
BaseInfoNotifyLocalHome.java
5.local home jndi name is:BaseInfoNotifyLocal.
6.I deploy the EJB by Jbuilder automatically.
Then I want to access the EJB throuth a servlet by the following code:
Context context = new InitialContext();
baseInfoNotifyLocalHome = (BaseInfoNotifyLocalHome)context.lookup("BaseInfoNotifyLocal");
exceptions:
javax.naming.LinkException: . Root exception is javax.naming.NameNotFoundExcept
ion: Unable to resolve 'app/ejb/EJBBusiness.jar#BaseInfoNotify/local-home' Resol
ved: 'app/ejb' Unresolved:'EJBBusiness.jar#BaseInfoNotify' ; remaining name 'EJB
Business.jar#BaseInfoNotify/local-home'
at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(Basic
NamingNode.java:858)
at weblogic.jndi.internal.BasicNamingNode.lookupHere(BasicNamingNode.jav
a:223)
at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:18
7)
at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:19
5)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:338)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:333)
at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:19
7)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:338)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:333)
at weblogic.jndi.factories.java.ReadOnlyContextWrapper.lookup(ReadOnlyCo
ntextWrapper.java:36)
Why is Unresolved:'EJBBusiness.jar#BaseInfoNotify' ???????????i have the same problem!
i create a sessionbean with local home,
i call it with an other sessionbean in a same jar,that's ok!but i call it with a jsp file ,throw errs!
why?
how can i get a locahome outside a jar?
thank you very much! -
Does Weblogic7.0 supports JMS-connector
HI,
I am not sure about this. please someone gives some insights..
As in the connector specifications 1.0 IN chapter 5 (Connection Management) it
is written
"An application component uses a connection factory to access a connection instance,
which the component then uses to connect to the underlying EIS. A resource adapter
acts as a factory of
connections. Examples of connections include database connections, JMS (Java Message
Service) connections, and SAP R/3 connections. Note that the support for pluggability
of JMS providers into an application server will be added in the future versions
of the specification."
And i think weblogic7.0 supports connector specifications 1.0 only. please someone(may
be from BEA) can tell that what is the truth. Can i develope a JMS connector and
deploy/run on weblogic7.0.
Regards
Akhil Nagpal
I'm going to get a bit carried away with my answer:
I'm not aware of any work going on in the area of JMS connectors, and I
don't think they are supported in 7.0. I'm really not conversant
- you will likely get a better answer from the
weblogic.developer.interest.connector newsgroup.
Note that MDBs and the messaging bridge already cache their
underlying connections efficiently -- so
there is no need for a connector there. Also most J2EE applications
can programmitically cache their JMS resources somewhere handy
in an EJB. (There is no performance hit for an unused
JMS object, except for memory usage.)
But if you need to pool JMS resources, consider writing your own
pool - there isn't much to it. Check the sample code at the end of
the "JMS Performance Guide" white-paper on dev2dev.bea.com.
If you can wait, Weblogic 8.1 (beta out soon) has a simple way
to automatically pool JMS connections via ejb resource references.
Hope this helps,
Tom
Akhil Nagpal wrote:
> HI,
> I am not sure about this. please someone gives some insights..
> As in the connector specifications 1.0 IN chapter 5 (Connection Management) it
> is written
> "An application component uses a connection factory to access a connection instance,
> which the component then uses to connect to the underlying EIS. A resource adapter
> acts as a factory of
> connections. Examples of connections include database connections, JMS (Java Message
> Service) connections, and SAP R/3 connections. Note that the support for pluggability
> of JMS providers into an application server will be added in the future versions
> of the specification."
>
>
> And i think weblogic7.0 supports connector specifications 1.0 only. please someone(may
> be from BEA) can tell that what is the truth. Can i develope a JMS connector and
> deploy/run on weblogic7.0.
>
> Regards
> Akhil Nagpal
>
>
>
Maybe you are looking for
-
Creating a folder for a document library in SharePoint online
Hello I am looking for a good place to get started on creating a folder for a document library using a powershell script. Thanks in advance for any help.
-
I updated my windows 8 to 8.1 and it doesnt let my ipod sync so i can down load anything. any help?
-
Print problems Adobe Reader XI
During years I could print a pdf file directly pushing the print button on this file. If I push now the print button on every pdf file, a new window is directly opening only with a save button and only this saved pdf file is printable. This way s ver
-
Sudden problem with importing tiff files with alpha channel (CS5)
OK this is driving me nuts. For years I have been importing image files that have an alpha channel into FCP as.tiff files. I use Photoshop files only when I want to use the layers as they are too cumbersome otherwise). I have recent upgraded Photosh
-
Need the report for database fragmentation
HI, Is there any script to get database defragmentation report Thanks