Null Ponter Exeption When Deploying EJB
Hi All,
I 've put EJB QL using CMR on deployment descriptor,
then I compiled that, it succeeded.
But when I tried deploying and running it on my local OC4J, I got Null Pointer Exception.
Here's the message:
Starting OC4J using the following ports: HTTP=8988, RMI=23891, JMS=9227.]
[waiting for the server to complete its initialization...]
Embedded OC4J startup time: 28531 ms.
Copying default deployment descriptor from archive at E:\work\projects\gov_id\tax\classes/META-INF/orion-ejb-jar.xml to deployment directory C:\NS\jdev\jdev\system9.0.3.1035\oc4j-config\application-deployments\current-workspace-app\classes...
Auto-deploying file:/E:/work/projects/gov_id/tax/classes/ (No previous deployment found)... java.lang.NullPointerException
void com.evermind.server.ejb.compilation.CMPObjectCompilation.appendORWriteMethod(com.evermind.util.ByteString, com.evermind.server.ejb.deployment.ContainerManagedField,java.beans.PropertyDescriptor, com.evermind.server.ejb.deployment.Dependent, java.lang.String)
Is there any body who can help me?
I'm using JDev 9.0.3 with OC4j
Thanks very much for the help,
Long postings are being truncated to ~1 kB at this time.
App Server is 10.1.3
Using EJB 3.0
thanks for any help
p
Similar Messages
-
Error when deploying ejb 3 in weblogic10
Hi,
I'm using the EJB3.0 in weblogic10, just as the following:
remote interface:
com.test.intf
public interface Test{
public void test();
and the impl:
com.test.impl
@stateless
@Remote(Test.class)
public class TestBean implements Test{
public void test{...}
Then I build an ear which including the ejb jar:
Test.ear
|__ejb.jar (including the Test and the TestBean)
|
|__Meta-Inf
And when I deploy the Test.jar to the weblogic 10, the following error occurs:
weblogic.utils.AssertionError: ***** ASSERTION FAILED *****[ Unable to load clas
s com.test.impl.TestBean_3u7muo_EmergencyServiceF
uncImpl ]
at weblogic.ejb.container.deployer.Ejb3SessionBeanInfoImpl.prepare(Ejb3S
essionBeanInfoImpl.java:319)
at weblogic.ejb.container.deployer.EJBDeployer.setupBeanInfos(EJBDeploye
r.java:914)
at weblogic.ejb.container.deployer.EJBDeployer.prepare(EJBDeployer.java:
1188)
at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:425)
at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(Modu
leListenerInvoker.java:93)
at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(Depl
oymentCallbackFlow.java:387)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineD
river.java:37)
at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(Dep
loymentCallbackFlow.java:58)
at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(Dep
loymentCallbackFlow.java:42)
at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.ja
va:615)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineD
river.java:37)
at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.j
ava:191)
at weblogic.application.internal.EarDeployment.prepare(EarDeployment.jav
a:16)
at weblogic.application.internal.DeploymentStateChecker.prepare(Deployme
ntStateChecker.java:155)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(App
ContainerInvoker.java:60)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.cr
eateAndPrepareContainer(ActivateOperation.java:197)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.do
Prepare(ActivateOperation.java:89)
at weblogic.deploy.internal.targetserver.operations.AbstractOperation.pr
epare(AbstractOperation.java:217)
at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploym
entPrepare(DeploymentManager.java:723)
at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploy
mentList(DeploymentManager.java:1190)
at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare
(DeploymentManager.java:248)
at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.pre
pare(DeploymentServiceDispatcher.java:159)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallb
ackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:157)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallb
ackDeliverer.access$000(DeploymentReceiverCallbackDeliverer.java:12)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallb
ackDeliverer$1.run(DeploymentReceiverCallbackDeliverer.java:45)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTunin
gWorkManagerImpl.java:516)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
Caused by: java.lang.ClassNotFoundException: com.oracle.ocrt.service.impl.Emerge
ncyServiceFuncBean_3u7muo_TestIntf
at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(Generic
ClassLoader.java:283)
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClass
Loader.java:256)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClass
Loader.java:176)
at weblogic.ejb.container.deployer.BeanInfoImpl.loadClass(BeanInfoImpl.j
ava:540)
at weblogic.ejb.container.deployer.Ejb3SessionBeanInfoImpl.prepare(Ejb3S
essionBeanInfoImpl.java:310)
... 27 more
<2008-9-26 下午08时35分07秒 CST> <Error> <Deployer> <BEA-149265> <Failure occurr
ed in the execution of deployment request with ID '1222432506169' for task '0'.
Error is: 'weblogic.application.ModuleException: Exception preparing module: EJB
Module(test.jar)
Unable to deploy EJB: TestBean from test.jar:
***** ASSERTION FAILED *****[ Unable to load class com.test.impl.TestBean_3u7muo_TestImpl ]
weblogic.application.ModuleException: Exception preparing module: EJBModule(test.jar)
Unable to deploy EJB: TestBean from test.jar:
***** ASSERTION FAILED *****[ Unable to load class com.test.impl.TestBean_3u7muo_TestImpl ]
at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:452)
What is the problem? And What can I do?
BTW, if I change the @Remote to @Local, I can deploy the ejb successfully.
In addition, Who knows how to access the ejb3.0 from a standalone client just like access the EJB2.0:
properties = new Properties();
properties.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
properties.put(Context.PROVIDER_URL, "t3://localhost:7001");
Context cont = new InitialContext(properties);
Obj ref = cont.lookup("???"); //--------------------> What should I write here???
Thanks!Hi,
It's not easy to tell what's wrong with your example.
Maybe you could send me a zip and I'll check when I have some time.
By the way, you're asking a question about the lookup of an EJB3, I wrote an article that covers that topic.
It should give you some interesting input.
http://m-button.blogspot.com/2008/07/reminder-on-how-to-use-ejb3-with.html
Regards. -
Invalid change to class error when deploying EJB
We have EJBs that were built by Webgain Visual Cafe and successfully deploy
to WLS 5.1. We then use the WLE EJB Deployer Tool to build WLE container
classes and deploy the same EJBs in WLE 5.1.
One EJB does not deploy in WLE. The ULOG error message is:
133929.EA-LAWSTUC!JavaServer.517: main: IJENGINE_CAT:150: ERROR: Invalid
change to class service.Request
133929.EA-LAWSTUC!JavaServer.517: main: EJB_CAT:29: ERROR: While deploying
jar ServiceEJB : com.beasys.weblogic.classloader.RedeploymentException:
ERROR: Invalid change to class service.Request
133929.EA-LAWSTUC!JavaServer.517: Finalizer: IJENGINE_CAT:152: INFO: Closing
jar C:\aj\ServiceEJB_WLE.jar
Does anyone know what can cause an "invalid change to class" error when
deploying to WLE 5.1? Especially since the EJB deploys successfully in
WLS.
Carl LawstuenReason: database keeps a reference of the class in JAVA$CLASS$MD5$TABLE table. This table keeps a refrence to all java classes loaded in database, and is present in each schema you deploy classes. That's the reason why if you change the application module name, you can load this classes. It instead keeps a reference if you use DROP JAVA CLASS command to drop a java class from de database. Use DROP JAVA command to clear the reference of the dropped classes when dropping it.
You can see this table as a class dictionary of the database, and you don't have to handle this records manually. -
Report Builder 2.0 loses parameter Null default value when deployed
When a parameter is set to a default value of (Null) and the report is saved to the sever, the default is lost when the report is re-opened in RB2. This problem doesn't seem to occur in BIDS. I've tried to use an expression to set the value to System.DBNull but this can no longer be done.
Any ideas for a work-around?
Is there a bug report open for this? I couldn't find an open bug on the Connections site and there's an issue on that site right now when submitting feedback.Paul Turley [Hitachi Consulting]
SQLServerBIBlog.comHi All,
I just had an almost identical issue using report builder 3.0 so I don't believe it is fixed. I had 4 parameters set to default to (Null) and I added a new one with identical settings but it would continually come up blank and not check the null box automatically
when going into my sub report.
To make matters worse I experimented changing one of the old parameters and it then started exhibiting the same behaviour. Using Luke's post above solved the issue (though it was Manage in my version not Administrate).
Using System.DBNull.Value resulted in it being treated as a literal string "System.DBNull.Value" and putting that in the filter for me.
Hope it helps. -
Problem in when deploying EJB 3 using NetBean 5.5 with Glassfish and Derby
Hi,
I'm using glass fish with NetBean. My EJB module built with no error, but when I run the application (the ear) in NetBean, the deployment fails with following errors in server log:
Anyone has idea why this is happening?
[TopLink Config]: 2007.04.29 03:28:43.347--ServerSession(26985473)--Connection(29068073)--Connected: jdbc:derby://localhost:1527/auction_database
User: admin
Database: Apache Derby Version: 10.1.3.1
Driver: Apache Derby Network Client JDBC Driver Version: 10.1.3.1
[TopLink Info]: 2007.04.29 03:28:43.407--ServerSession(26985473)--file:/C:/Sun/SDK/domains/domain1/applications/j2ee-apps/AuctionEnterpriseApplication/AuctionEnterpriseApplication-ejb_jar/-AuctionEnterpriseApplication-ejbPU login successful
[TopLink Config]: 2007.04.29 03:28:43.437--ServerSession(26985473)--Connection(6880990)--disconnect
[TopLink Info]: 2007.04.29 03:28:43.437--ServerSession(26985473)--file:/C:/Sun/SDK/domains/domain1/applications/j2ee-apps/AuctionEnterpriseApplication/AuctionEnterpriseApplication-ejb_jar/-AuctionEnterpriseApplication-ejbPU logout successful
UTIL6040: Error attempting to delete C:\Sun\SDK\domains\domain1\generated\ejb\j2ee-apps\AuctionEnterpriseApplication\AuctionEnterpriseApplication_AuctionEnterpriseApplication-ejb_AuctionEnterpriseApplication-ejbPU_createDDL.jdbc
UTIL6041: Performing gc to try to force file closures
UTIL6042: Attempt to delete C:\Sun\SDK\domains\domain1\generated\ejb\j2ee-apps\AuctionEnterpriseApplication\AuctionEnterpriseApplication_AuctionEnterpriseApplication-ejb_AuctionEnterpriseApplication-ejbPU_createDDL.jdbc succeeded after 2 retries
Exception occured in J2EEC Phase
com.sun.enterprise.deployment.backend.IASDeploymentException
at oracle.toplink.essentials.tools.schemaframework.DefaultTableGenerator.addForeignKeyFieldToFieldDefinition(DefaultTableGenerator.java:409)
at oracle.toplink.essentials.tools.schemaframework.DefaultTableGenerator.addForeignKeyFieldToSourceTargetTable(DefaultTableGenerator.java:384)
at oracle.toplink.essentials.tools.schemaframework.DefaultTableGenerator.postInitTableSchema(DefaultTableGenerator.java:285)
at oracle.toplink.essentials.tools.schemaframework.DefaultTableGenerator.generateDefaultTableCreator(DefaultTableGenerator.java:138)
at oracle.toplink.essentials.tools.schemaframework.SchemaManager.replaceDefaultTables(SchemaManager.java:817)
at oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider.createOrReplaceDefaultTables(EntityManagerFactoryProvider.java:307)
at oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider.writeDDLsToFiles(EntityManagerFactoryProvider.java:330)
at oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider.generateDDLFiles(EntityManagerFactoryProvider.java:235)
at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:231)
at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:78)
at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:113)
at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:107)
at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:76)
at com.sun.jdo.spi.persistence.support.ejb.ejbc.PersistenceProcessor.loadPersistenceUnitBundle(PersistenceProcessor.java:468)
at com.sun.jdo.spi.persistence.support.ejb.ejbc.PersistenceProcessor.createTablesInDB(PersistenceProcessor.java:325)
at com.sun.jdo.spi.persistence.support.ejb.ejbc.PersistenceProcessor.processAppBundle(PersistenceProcessor.java:190)
at com.sun.jdo.spi.persistence.support.ejb.ejbc.PersistenceProcessor.processApplication(PersistenceProcessor.java:125)
at com.sun.jdo.spi.persistence.support.ejb.ejbc.DeploymentEventListenerImpl.processApplication(DeploymentEventListenerImpl.java:193)
at com.sun.jdo.spi.persistence.support.ejb.ejbc.DeploymentEventListenerImpl.processEvent(DeploymentEventListenerImpl.java:152)
at com.sun.jdo.spi.persistence.support.ejb.ejbc.DeploymentEventListenerImpl.notifyDeploymentEvent(DeploymentEventListenerImpl.java:109)
at com.sun.enterprise.deployment.backend.DeploymentEventManager.notifyDeploymentEvent(DeploymentEventManager.java:66)
at com.sun.enterprise.deployment.backend.AppDeployer.postDeploy(AppDeployer.java:429)
at com.sun.enterprise.deployment.backend.AppDeployer.deploy(AppDeployer.java:225)
at com.sun.enterprise.deployment.backend.AppDeployer.doRequestFinish(AppDeployer.java:129)
at com.sun.enterprise.deployment.phasing.J2EECPhase.runPhase(J2EECPhase.java:169)
at com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:95)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:871)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:266)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:739)
at com.sun.enterprise.management.deploy.DeployThread.deploy(DeployThread.java:174)
at com.sun.enterprise.management.deploy.DeployThread.run(DeployThread.java:210)Hi thanks, I'm using the default table generator offerred by the app server. my entity classes have relationship with each other. for example, in the Bid entity, I have the mapping to AuctionItem antity.
@JoinColumn(name = "auctionItems_itemid", referencedColumnName = "itemid")
@ManyToOne
public entities.AuctionItem getAuctionItems() {
return auctionItems;
public void setAuctionItems(entities.AuctionItem auctionItems) {
this.auctionItems = auctionItems;
} -
Error when deploying EJB Session Info to 8.1.7 DB
Hi all,
I'm trying to make a deploy of BC4J project into Oracle 8.1.7 database with JDeveloper 3.2.2. When I try to deploy all the project, I get an oracle error and I'm disconnected from the database: "end of file on communication channel". java_pool_size paramete has a value of 70 Mbytes in database.
But when I'm trying to make a deploy of files generated by deployment profile, I get oracle's errors in <appModuleName>OrcleServerEJB.prf file deployment:
Error while granting to <package>/common/ejb/<appMod>Home
ORA-04042: package, procedure or function does not exists.
Error while resolving class <package>/common/ejb/<appMod>Home
ORA-04043: object /6d1c81a7_<appModName>ModuleHome does not exist.
Any ideas?
Thanx in advance.Reason: database keeps a reference of the class in JAVA$CLASS$MD5$TABLE table. This table keeps a refrence to all java classes loaded in database, and is present in each schema you deploy classes. That's the reason why if you change the application module name, you can load this classes. It instead keeps a reference if you use DROP JAVA CLASS command to drop a java class from de database. Use DROP JAVA command to clear the reference of the dropped classes when dropping it.
You can see this table as a class dictionary of the database, and you don't have to handle this records manually. -
Failure When Deploying EJB Project That Uses Library Onto Glassfish
<font size=4>Hi,
I have a multi project application that I am developing and I am having issues testing it. I have set up a EAR, WAR, EJB, and two library JARs. The EJB contains classes that use components from the library JARs or implement abstract classes from the library JARs. I have added the library JARs to the compile-time libraries of the EJB. I then also added the library JARs to the libraries of the EAR. However when I then go to deploy the EAR onto the Glassfish server I get this error, displayed in the Glassfish log:</font><br>
<font size=2><font color="red">WARNING: Error in annotation processing: java.lang.NoClassDefFoundError: com/foo/sdk/core/AbstractClass</font><br>
<font color="red">WARNING: Error in annotation processing: java.lang.NoClassDefFoundError: com/foo/sdk/core/AbstractClass</font><br>
<font color="red">WARNING: Error in annotation processing: java.lang.NoClassDefFoundError: com/foo/sdk/core/AbstractClass</font><br>
<font color="red">WARNING: Error in annotation processing: java.lang.NoClassDefFoundError: com/foo/sdk/core/AbstractClas</font><br>
<font color="red">SEVERE: Class [ com/foo/sdk/core/InterfaceClass ] not found. Error while loading [ class com.foo2.BeanFooClass ]</font><br>
<font color="red">SEVERE: Exception while deploying the app [FooEAR]</font><br>
<font color="red">SEVERE: Invalid ejb jar [BeanFoo.jar]: it contains zero ejb. </font><br>
Note:
1. A valid ejb jar requires at least one session, entity (1.x/2.x style), or message-driven bean.
2. EJB3+ entity beans (@Entity) are POJOs and please package them as library jar.
3. If the jar file contains valid EJBs which are annotated with EJB component level annotations (@Stateless, @Stateful, @MessageDriven, @Singleton), please check server.log to see whether the annotations were processed properly.
java.lang.IllegalArgumentException: Invalid ejb jar [BeanFoo.jar]: it contains zero ejb.
Note:
1. A valid ejb jar requires at least one session, entity (1.x/2.x style), or message-driven bean.
2. EJB3+ entity beans (@Entity) are POJOs and please package them as library jar.
3. If the jar file contains valid EJBs which are annotated with EJB component level annotations (@Stateless, @Stateful, @MessageDriven, @Singleton), please check server.log to see whether the annotations were processed properly.
at com.sun.enterprise.deployment.util.EjbBundleValidator.accept(EjbBundleValidator.java:76)
at com.sun.enterprise.deployment.util.ApplicationValidator.accept(ApplicationValidator.java:128)
at com.sun.enterprise.deployment.EjbBundleDescriptor.visit(EjbBundleDescriptor.java:730)
at com.sun.enterprise.deployment.Application.visit(Application.java:1768)
at com.sun.enterprise.deployment.archivist.ApplicationArchivist.validate(ApplicationArchivist.java:799)
at com.sun.enterprise.deployment.archivist.ApplicationArchivist.openWith(ApplicationArchivist.java:277)
at com.sun.enterprise.deployment.archivist.ApplicationFactory.openWith(ApplicationFactory.java:240)
at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:170)
at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:93)
at com.sun.enterprise.v3.server.ApplicationLifecycle.loadDeployer(ApplicationLifecycle.java:826)
at com.sun.enterprise.v3.server.ApplicationLifecycle.setupContainerInfos(ApplicationLifecycle.java:768)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:368)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:370)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:355)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:370)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1067)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:96)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1247)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1235)
at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:465)
at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:222)
at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:168)
at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:234)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:822)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:719)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1013)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
at java.lang.Thread.run(Thread.java:679)
<font color="red">SEVERE: Exception while deploying the app [FooEAR] : Invalid ejb jar [FooBean.jar]: it contains zero ejb. </font><br>
Note:
1. A valid ejb jar requires at least one session, entity (1.x/2.x style), or message-driven bean.
2. EJB3+ entity beans (@Entity) are POJOs and please package them as library jar.
3. If the jar file contains valid EJBs which are annotated with EJB component level annotations (@Stateless, @Stateful, @MessageDriven, @Singleton), please check server.log to see whether the annotations were processed properly.</font><br>
<font size=4>I am using these technologies:
NetBeans IDE 7.0 for Java EE
Glassfish 3.1
I did read that putting the libraries in this directory: <glassfish_home>/domains/domain1/lib may resolve the problem, however there must be a better way.
Any help would be greatly appreciated!</font>
Edited by: 866180 on Jun 15, 2011 2:32 PMFirst of all, use a normal font when posting a question. This is just terrible to read.
You have multiple failures here. Did you actually read and try to understand the error?
java.lang.NoClassDefFoundError: com/foo/sdk/core/AbstractClassJava is not going to lie, this class is not on the classpath of the application. Either the jar is missing, the class is missing from the jar or you put the jar in the wrong place. Open up the ear using your favorite zip tool and check out its structure. What is the path to the jar inside it?
Also, open up the META-INF/manifest.mf file inside the EJB jar. Is there a class-path line in there? There shouldn't be!
A valid ejb jar requires at least one session, entity (1.x/2.x style), or message-driven bean. Apparently your EJB jar contains not a single EJB or MDB class. Did you forget some annotations perhaps?
Seems to me that your application compiles, but other than that it is very much broken. -
Hi,
I try to deploy an ejb in oracle 8.1.7.
All the steps of the deployment work fine until the step :
"Generating EJBHome and EJBObject on the server..."
At this step, it returns the following error messages :
Compilation errors in oracle/aurora/ejb/gen/test_editionpdf_editionPDFBean/EjbObject_EditionPDF:ORA-29535: source requires recompila
tion
javax/ejb/EJBObjectOperations: Authorization error for referenced class org/xml/sax/XMLReader.
javax/ejb/EJBObjectOperations: Authorization error for referenced class org/xml/sax/XMLReader.
javax/ejb/EJBObjectOperations: Authorization error for referenced class org/apache/xalan/xslt/XSLTInputSource.
javax/ejb/EJBObjectOperations: Authorization error for referenced class org/apache/xalan/xslt/XSLTInputSource.
oracle/aurora/ejb/gen/test_editionpdf_editionPDFBean/EjbObject_EditionPDF:112: Class org.xml.sax.XMLReader not found.
oracle/aurora/ejb/gen/test_editionpdf_editionPDFBean/EjbObject_EditionPDF:122: Class org.xml.sax.XMLReader not found.
oracle/aurora/ejb/gen/test_editionpdf_editionPDFBean/EjbObject_EditionPDF:161: Variable __returnValue may not have been initialized.
oracle/aurora/ejb/gen/test_editionpdf_editionPDFBean/EjbObject_EditionPDF:218: Class org.apache.xalan.xslt.XSLTInputSource not found
oracle/aurora/ejb/gen/test_editionpdf_editionPDFBean/EjbObject_EditionPDF:226: Class org.apache.xalan.xslt.XSLTInputSource not found
oracle/aurora/ejb/gen/test_editionpdf_editionPDFBean/EjbObject_EditionPDF:265: Variable __returnValue may not have been initialized.
oracle/aurora/ejb/gen/test_editionpdf_editionPDFBean/EjbObject_EditionPDF:270: Class org.apache.xalan.xslt.XSLTInputSource not found
oracle/aurora/ejb/gen/test_editionpdf_editionPDFBean/EjbObject_EditionPDF:278: Class org.apache.xalan.xslt.XSLTInputSource not found
oracle/aurora/ejb/gen/test_editionpdf_editionPDFBean/EjbObject_EditionPDF:317: Variable __returnValue may not have been initialized.
Info: 13 errors
Even if the concerned java classes 'org/xml/sax/XMLReader' and 'org/apache/xalan/xslt/XSLTInputSource' are stored in the database and have the 'valid' status.
Do I need to specify some security rules with the dbms_java package ?
Where could this problem come from ?
Thanks in advance
Bye
[email protected]Hi,
Y have the same problem with Jdeveloper.
May be it`s will help You
1. IDE compilation process can`t check some problem whith EJB, but this errrors checking on deployment process. Check Your remote interface independently.
2. If you use Oracle8i - connect to the server with admin options(login and password) or give for you user this privilege. Try make connect with name: SYS and password: change_on_install.
Sorry for bad English
null -
Error when deploying an CMP-Entity EJB
Hi ,
I am unable to deploy a simple example of CMP ,when i select Entity,then select Deployment Settings->Generate Default SQL,
My SQL Query is:'SELECT OBJECT(p) FROM Product p' for FfindAllProducts().
I get the error message:
ERROR:while generating SQL.
The SELECT clause has a return type that does not match the return type
of the select query for which it is defined
EJB QL statement: 'SELECT OBJECT(p)fROM Product p'
EJB QL method:public abstract java.util.Collection com.aa.ProductHome.findAllProducts() throws javax.ejb.FinderException,java.rmi.RemoteException.
Followinng are the codes of My bean
ProductHome.java
import javax.ejb.*;
import java.rmi.RemoteException;
import java.util.Collection;
public interface ProductHome extends EJBHome
Product create(String productId,String name , String description , double basePrice) throws CreateException,RemoteException;
public Product findByPrimaryKey(ProductPK key) throws FinderException,RemoteException;
public Collection findByName(String name) throws FinderException,RemoteException;
public Collection findByDescription(String description) throws FinderException,RemoteException;
public Collection findAllProducts() throws FinderException,RemoteException;
ProductBean.java
import javax.ejb.*;
import java.rmi.RemoteException;
public class ProductBean implements EntityBean
protected EntityContext ctx;
public String productid;
public String name;
public String description;
public ProductBean()
public String getName() throws RemoteException
return this.name;
public void setName(String name) throws RemoteException
this.name=name;
public String getDescription() throws RemoteException
return this.description;
public void setDescription(String description) throws RemoteException
this.description=description;
public String getProductId() throws RemoteException
return this.productid;
public void setProductId(String ProductId) throws RemoteException
this.productid=ProductId;
public void ejbActivate()
public void ejbPassivate()
public void ejbRemove()
public void ejbLoad()
public void ejbStore()
public void setEntityContext(EntityContext ctx)
this.ctx = ctx;
public void unsetEntityContext()
this.ctx = null;
public void ejbPostCreate(String productId,String name,String description,double baseprice)
public ProductPK ejbCreate(String productId,String name,String description,double baseprice) throws CreateException,RemoteException
called ");
setName(name);
setProductId(productId);
setDescription(description);
return null;
Product.java
import javax.ejb.*;
import java.rmi.RemoteException;
public interface Product extends EJBObject
public String getName() throws RemoteException;
public void setName(String name) throws RemoteException;
public String getDescription() throws RemoteException;
public void setDescription(String description) throws RemoteException;
public String getProductId() throws RemoteException;
public void setProductId(String productid) throws RemoteException;
ProductClient.java
import java.rmi.*;
import javax.rmi.*;
import javax.naming.*;
import javax.ejb.*;
import java.util.*;
public class ProductClient
public static void main(String ars[])
ProductHome home=null;
try
Context initial = new InitialContext();
Context myEnv = (Context)initial.lookup("java:comp/env");
Object objref = myEnv.lookup("ejb/TheProduct");
home = (ProductHome)PortableRemoteObject.narrow(objref,ProductHome.class);
home.create("123-446-7890","p5-350","350 Mhz Pentium",200 );
home.create("123-446-7891","p5-400","400 Mhz Pentium",300 );
home.create("123-446-7892","p5-450","450 Mhz Pentium",400 );
home.create("123-446-7893","p5-500","500 Mhz Pentium",500 );
home.create("123-446-7894","p5-550","550 Mhz Pentium",600 );
Iterator i = home.findByName("p5-400").iterator();
System.out.println(" Product Match the name of p5-400 " );
if ( i.hasNext() )
Product prod = (Product)PortableRemoteObject.narrow(i.next(),Product.class);
System.out.println(prod.getDescription());
else
throw new Exception(" Could not find Product ");
catch(Exception e)
System.out.println("Caught Exception " );
e.printStackTrace();
finally
if ( home != null)
System.out.println(" Destroying all products " );
try
Iterator i = home.findAllProducts().iterator();
while ( i.hasNext() )
Product prod = (Product)PortableRemoteObject.narrow(i.next(),Product.class);
if (prod.getProductId().startsWith("123"))
prod.remove();
catch (Exception e)
e.printStackTrace();
ProductPk.java
import java.io.Serializable;
public class ProductPK implements java.io.Serializable
public String ProductId ;
public ProductPK(String id)
this.ProductId = id;
public ProductPK()
public String toString()
return ProductId;
public int hashCode()
return ProductId.hashCode();
public boolean equals(Object Product)
return ((ProductPK)Product).ProductId.equals(ProductId);can u pls tell me u are using ejb1.1 specifications or ejb2.0 specifications.in both cases pls shoe u are descripters so that i can check.
-
Ejb-ref error when deploying a previously working ear on weblogic 8.1
when deploying an ear module on weblogic 8.1 i get the following error:
The ejb-link 'CustomessagingBrick.jar/CustomMessaginBrick' declared in ejb-ref
or ejb-local-ref 'ejb/Service2' in the application module 'cmbrick.war' could
not be resolved. The target EJB for the ejb ref could not be found.
The ear is composed of two sub-modules:
CustomMessaginBrick.jar
cmbrick.war.
The same ear was deployed on weblogic 6.1.
Every reference in the ear seems in the right place so i am really clueless.
Hereafter i include the relevant portions of the deployment descriptors.
the web.xml for cmbrick.war contains the following data:
<ejb-local-ref>
<ejb-ref-name>ejb/Service2</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local-home>com.hutchison3g.core.brick.custom.messaging.CustomMessagingBrickLocalHome</local-home>
<local>com.hutchison3g.core.brick.custom.messaging.CustomMessagingBrickLocal</local>
<ejb-link>CustomMessagingBrick</ejb-link>
</ejb-local-ref>
its weblogic.xml file is the following:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE weblogic-web-app PUBLIC "-//BEA Systems, Inc.//DTD Web Application 8.1//EN"
"http://www.bea.com/servers/wls810/dtd/weblogic810-web-jar.dtd">
<weblogic-web-app>
<reference-descriptor>
<ejb-reference-description>
<ejb-ref-name>ejb/Service2</ejb-ref-name>
<jndi-name>Service2</jndi-name>
</ejb-reference-description>
</reference-descriptor>
</weblogic-web-app>
while the weblogic-ejb-jar for CustomMessaging bricks contains the following:
<weblogic-enterprise-bean>
<ejb-name>CustomMessagingBrick</ejb-name>
<stateless-session-descriptor>
<pool>
</pool>
<stateless-clustering>
</stateless-clustering>
</stateless-session-descriptor>
<transaction-descriptor>
</transaction-descriptor>
<enable-call-by-reference>True</enable-call-by-reference>
<jndi-name>Service2</jndi-name>
</weblogic-enterprise-bean>....when deploying an ear module on weblogic 8.1 i get the following error:
The ejb-link 'CustomessagingBrick.jar/CustomMessaginBrick' declared in ejb-ref
or ejb-local-ref 'ejb/Service2' in the application module 'cmbrick.war' could
not be resolved. The target EJB for the ejb ref could not be found.
The ear is composed of two sub-modules:
CustomMessaginBrick.jar
cmbrick.war.
The same ear was deployed on weblogic 6.1.
Every reference in the ear seems in the right place so i am really clueless.
Hereafter i include the relevant portions of the deployment descriptors.
the web.xml for cmbrick.war contains the following data:
<ejb-local-ref>
<ejb-ref-name>ejb/Service2</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local-home>com.hutchison3g.core.brick.custom.messaging.CustomMessagingBrickLocalHome</local-home>
<local>com.hutchison3g.core.brick.custom.messaging.CustomMessagingBrickLocal</local>
<ejb-link>CustomMessagingBrick</ejb-link>
</ejb-local-ref>
its weblogic.xml file is the following:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE weblogic-web-app PUBLIC "-//BEA Systems, Inc.//DTD Web Application 8.1//EN"
"http://www.bea.com/servers/wls810/dtd/weblogic810-web-jar.dtd">
<weblogic-web-app>
<reference-descriptor>
<ejb-reference-description>
<ejb-ref-name>ejb/Service2</ejb-ref-name>
<jndi-name>Service2</jndi-name>
</ejb-reference-description>
</reference-descriptor>
</weblogic-web-app>
while the weblogic-ejb-jar for CustomMessaging bricks contains the following:
<weblogic-enterprise-bean>
<ejb-name>CustomMessagingBrick</ejb-name>
<stateless-session-descriptor>
<pool>
</pool>
<stateless-clustering>
</stateless-clustering>
</stateless-session-descriptor>
<transaction-descriptor>
</transaction-descriptor>
<enable-call-by-reference>True</enable-call-by-reference>
<jndi-name>Service2</jndi-name>
</weblogic-enterprise-bean>.... -
NPE occurs when deploying suitecase dependent on WSIF / EJB
I am getting a NullPointerException when deploying a BPEL process that depends on an EJB accessed via a WSIF definition. Both the ejb and the suitcase are deployed onto the same oc4j instance, and i have tested the ejb from a standalone client to ensure that it is operational, but i get the exception noted below. I can only assume that there may be something wrong with the WSIF definition, but I have checked it numerous times to make sure that it accurately reflects the ejb definition. Can you give me some hints as to some things to check that could possibly cause this error? From the stack trace, it seems that it is ejb related, but i guess i could be wrong:
<2006-04-11 11:20:28,088> <ERROR> <default.collaxa.cube.engine.deployment> <Cube
ProcessFactory::generateProcessClass>
Process "XYZ" (revision "1.01.000.0000") compilation failed.
<2006-04-11 11:20:28,182> <ERROR> <default.collaxa.cube.engine.deployment> <Cube
ProcessLoader::create>
<2006-04-11 11:20:28,182> <ERROR> <default.collaxa.cube.engine.deployment> Proce
ss "XYZ" (revision "1.01.000.0000") load FAILED!!
com.evermind.server.rmi.OrionRemoteException: java.lang.NullPointerException
at com.evermind.server.ejb.EJBUtils.getUserException(EJBUtils.java:296)
at IBPELDomainManagerBean_StatelessSessionBeanWrapper34.loadProcessArchi
ve(IBPELDomainManagerBean_StatelessSessionBeanWrapper34.java:2174)
at com.collaxa.cube.engine.deployment.CubeProcessMonitorWork.run(CubePro
cessMonitorWork.java:130)
at oracle.tip.adapter.fw.jca.work.WorkerJob.go(WorkerJob.java:51)
at oracle.tip.adapter.fw.common.ThreadPool.run(ThreadPool.java:267)
at java.lang.Thread.run(Thread.java:534)
Nested exception is:
java.lang.NullPointerException
at java.util.Hashtable.put(Hashtable.java:398)
at com.collaxa.cube.engine.deployment.CubeProcessHolder.addStatus(CubePr
ocessHolder.java:275)
at com.collaxa.cube.engine.deployment.CubeProcessHolder.bind(CubeProcess
Holder.java:1240)
at com.collaxa.cube.engine.deployment.CubeProcessHolder.loadAndBind(Cube
ProcessHolder.java:882)
at com.collaxa.cube.engine.deployment.CubeProcessHolder.loadArchive(Cube
ProcessHolder.java:824)
at com.collaxa.cube.engine.CubeEngine.loadProcessArchive(CubeEngine.java
:939)
at com.collaxa.cube.ejb.impl.BPELDomainManagerBean.loadProcessArchive(BP
ELDomainManagerBean.java:390)
at IBPELDomainManagerBean_StatelessSessionBeanWrapper34.loadProcessArchi
ve(IBPELDomainManagerBean_StatelessSessionBeanWrapper34.java:2157)
at com.collaxa.cube.engine.deployment.CubeProcessMonitorWork.run(CubePro
cessMonitorWork.java:130)
at oracle.tip.adapter.fw.jca.work.WorkerJob.go(WorkerJob.java:51)
at oracle.tip.adapter.fw.common.ThreadPool.run(ThreadPool.java:267)
at java.lang.Thread.run(Thread.java:534)
<2006-04-11 11:20:28,182> <ERROR> <default.collaxa.cube.engine.deployment> <Cube
ProcessMonitorWork::run> Error while loading process archive C:\OraBpelPM\integr
ation\orabpel\domains\default\deploy\bpel_XYZ_1.01.000.0000.jar
com.evermind.server.rmi.OrionRemoteException: java.lang.NullPointerException
at com.evermind.server.ejb.EJBUtils.getUserException(EJBUtils.java:296)
at IBPELDomainManagerBean_StatelessSessionBeanWrapper34.loadProcessArchi
ve(IBPELDomainManagerBean_StatelessSessionBeanWrapper34.java:2174)
at com.collaxa.cube.engine.deployment.CubeProcessMonitorWork.run(CubePro
cessMonitorWork.java:130)
at oracle.tip.adapter.fw.jca.work.WorkerJob.go(WorkerJob.java:51)
at oracle.tip.adapter.fw.common.ThreadPool.run(ThreadPool.java:267)
at java.lang.Thread.run(Thread.java:534)
Nested exception is:
java.lang.NullPointerException
at java.util.Hashtable.put(Hashtable.java:398)
at com.collaxa.cube.engine.deployment.CubeProcessHolder.addStatus(CubePr
ocessHolder.java:275)
at com.collaxa.cube.engine.deployment.CubeProcessHolder.bind(CubeProcess
Holder.java:1240)
at com.collaxa.cube.engine.deployment.CubeProcessHolder.loadAndBind(Cube
ProcessHolder.java:882)
at com.collaxa.cube.engine.deployment.CubeProcessHolder.loadArchive(Cube
ProcessHolder.java:824)
at com.collaxa.cube.engine.CubeEngine.loadProcessArchive(CubeEngine.java
:939)
at com.collaxa.cube.ejb.impl.BPELDomainManagerBean.loadProcessArchive(BP
ELDomainManagerBean.java:390)
at IBPELDomainManagerBean_StatelessSessionBeanWrapper34.loadProcessArchi
ve(IBPELDomainManagerBean_StatelessSessionBeanWrapper34.java:2157)
at com.collaxa.cube.engine.deployment.CubeProcessMonitorWork.run(CubePro
cessMonitorWork.java:130)
at oracle.tip.adapter.fw.jca.work.WorkerJob.go(WorkerJob.java:51)
at oracle.tip.adapter.fw.common.ThreadPool.run(ThreadPool.java:267)
at java.lang.Thread.run(Thread.java:534)Note, that this has nothing to do with WSIF.. and is a cmpilation error ...
my best guess is the revision number..
Process "XYZ" (revision "1.01.000.0000") load FAILED!! can you change that to reflect a norma double or in (1, 1.1, 2.0...)
thx clemens -
WebLogic 12.1.2 fails when deploying an enterprise application(ear) that contains a ejb in which injected 1) an extension 2)bean with injection of this extension.
The following exception is thrown:
Caused By: org.jboss.weld.exceptions.DeploymentException: WELD-001409 Ambiguous dependencies for type [CdiExtension] with qualifiers [@Default] at injection point [[field] @Inject private test.extension.Bean1.extension].
Possible dependencies [
[Extension [class test.extension.CdiExtension] with qualifiers [@Default]; zip:/domain1/servers/AdminServer/tmp/_WL_user/test/7x6roh/lib/test-extension-0.0.1-SNAPSHOT.jar!/META-INF/services/javax.enterprise.inject.spi.Extension@1[test.extension.CdiExtension@1115deb],
Extension [class test.extension.CdiExtension] with qualifiers [@Default]; zip:/domain1/servers/AdminServer/tmp/_WL_user/test/7x6roh/lib/test-extension-0.0.1-SNAPSHOT.jar!/META-INF/services/javax.enterprise.inject.spi.Extension@1[test.extension.CdiExtension@ed791f]]]
at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:314)
at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:280)
at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:143)
at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:163)
at org.jboss.weld.bootstrap.Validator.validateBeans(Validator.java:382)
at org.jboss.weld.bootstrap.Validator.validateDeployment(Validator.java:367)
at org.jboss.weld.bootstrap.WeldBootstrap.validateBeans(WeldBootstrap.java:379)
at com.oracle.injection.provider.weld.WeldInjectionContainer.start(WeldInjectionContainer.java:106)
at com.oracle.injection.integration.CDIAppDeploymentExtension.initCdi(CDIAppDeploymentExtension.java:70)
at com.oracle.injection.integration.CDIAppDeploymentExtension.activate(CDIAppDeploymentExtension.java:47)
at weblogic.application.internal.flow.AppDeploymentExtensionFlow.activate(AppDeploymentExtensionFlow.java:37)
at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:729)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:42)
at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:258)
at weblogic.application.internal.EarDeployment.activate(EarDeployment.java:61)
at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:165)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:80)
Problem can be easily reproduced by a minimal case:
test.ear:
\lib\test-extension-0.0.1-SNAPSHOT.jar
test-ejb-0.0.1-SNAPSHOT.jar
where
test-extension-0.0.1-SNAPSHOT.jar contains:
CdiExtension.java:
package test.extension;
import javax.enterprise.inject.spi.Extension;
public class CdiExtension implements Extension {
private String someString = "Some String";
public String getSomeString() {
return someString;
Bean1.java:
package test.extension;
import javax.enterprise.context.ApplicationScoped;
import javax.inject.Inject;
@ApplicationScoped
public class Bean1 {
@Inject
private CdiExtension extension;
public String get() {
return extension.getSomeString();
test-ejb-0.0.1-SNAPSHOT.jar contains:
EjbBean.java:
package test;
import test.extension.Bean1;
import test.extension.CdiExtension;
import javax.ejb.Stateless;
import javax.inject.Inject;
@Stateless
public class EjbBean {
@Inject
private CdiExtension extension;
@Inject
private Bean1 bean1;
public String getSomeString() {
return extension.getSomeString() + "\n" + bean1.get();
p.s. i seen same problem in community.oracle.com/thread/2577403 , but it happen in "war", not "ear", and seems successfully patched with patch №17424706Hi,
It looks like there is patch exists for this issue.
Patch 17198187
Please try to download from the MOS or try to open a ticket with support.
Regards,
Kal -
Ejb-ref errore when deploying a previously working ear on weblogic 8.1
when deploying an ear module on weblogic 8.1 i get the following error:
The ejb-link 'CustomessagingBrick.jar/CustomMessaginBrick' declared in ejb-ref
or ejb-local-ref 'ejb/Service2' in the application module 'cmbrick.war' could
not be resolved. The target EJB for the ejb ref could not be found.
The ear is composed of two sub-modules:
CustomMessaginBrick.jar
cmbrick.war.
The same ear was deployed on weblogic 6.1.
Every reference in the ear seems in the right place so i am really clueless.
Hereafter i include the relevant portions of the deployment descriptors.
Thanks in advance!
Greets,
Luca
the web.xml for cmbrick.war contains the following data:
<ejb-local-ref>
<ejb-ref-name>ejb/Service2</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local-home>com.hutchison3g.core.brick.custom.messaging.CustomMessagingBrickLocalHome</local-home>
<local>com.hutchison3g.core.brick.custom.messaging.CustomMessagingBrickLocal</local>
<ejb-link>CustomMessagingBrick</ejb-link>
</ejb-local-ref>
its weblogic.xml file is the following:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE weblogic-web-app PUBLIC "-//BEA Systems, Inc.//DTD Web Application 8.1//EN"
"http://www.bea.com/servers/wls810/dtd/weblogic810-web-jar.dtd">
<weblogic-web-app>
<reference-descriptor>
<ejb-reference-description>
<ejb-ref-name>ejb/Service2</ejb-ref-name>
<jndi-name>Service2</jndi-name>
</ejb-reference-description>
</reference-descriptor>
</weblogic-web-app>
while the weblogic-ejb-jar for CustomMessaging bricks contains the following:
<weblogic-enterprise-bean>
<ejb-name>CustomMessagingBrick</ejb-name>
<stateless-session-descriptor>
<pool>
</pool>
<stateless-clustering>
</stateless-clustering>
</stateless-session-descriptor>
<transaction-descriptor>
</transaction-descriptor>
<enable-call-by-reference>True</enable-call-by-reference>
<jndi-name>Service2</jndi-name>
</weblogic-enterprise-bean>....The issue is that WLS 6.1 didn't really support ejb-links properly. An
ejb-link should allow you to link a webapp or an ejb to another EJB
without requiring additional information or a global JNDI name on the
target EJB.
WLS 8.1 is following your ejb-link and telling you there's not enough
information.
You have 2 options:
1) Remove the <ejb-link>...</ejb-link> from your web.xml. You'll be
using just an ejb-reference at that point, but you've already included
the necessary information in the weblogic.xml that we can locate the EJB
via its global jndi-name
or
2) Change the ejb-link to be
<ejb-link>CustomMessaginBrick.jar#CustomMessagingBrick</ejb-link>
If you wanted to, you could then remove the reference info from the
weblogic.xml
-- Rob
luca wrote:
when deploying an ear module on weblogic 8.1 i get the following error:
The ejb-link 'CustomessagingBrick.jar/CustomMessaginBrick' declared in ejb-ref
or ejb-local-ref 'ejb/Service2' in the application module 'cmbrick.war' could
not be resolved. The target EJB for the ejb ref could not be found.
The ear is composed of two sub-modules:
CustomMessaginBrick.jar
cmbrick.war.
The same ear was deployed on weblogic 6.1.
Every reference in the ear seems in the right place so i am really clueless.
Hereafter i include the relevant portions of the deployment descriptors.
Thanks in advance!
Greets,
Luca
the web.xml for cmbrick.war contains the following data:
<ejb-local-ref>
<ejb-ref-name>ejb/Service2</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local-home>com.hutchison3g.core.brick.custom.messaging.CustomMessagingBrickLocalHome</local-home>
<local>com.hutchison3g.core.brick.custom.messaging.CustomMessagingBrickLocal</local>
<ejb-link>CustomMessagingBrick</ejb-link>
</ejb-local-ref>
its weblogic.xml file is the following:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE weblogic-web-app PUBLIC "-//BEA Systems, Inc.//DTD Web Application 8.1//EN"
"http://www.bea.com/servers/wls810/dtd/weblogic810-web-jar.dtd">
<weblogic-web-app>
<reference-descriptor>
<ejb-reference-description>
<ejb-ref-name>ejb/Service2</ejb-ref-name>
<jndi-name>Service2</jndi-name>
</ejb-reference-description>
</reference-descriptor>
</weblogic-web-app>
while the weblogic-ejb-jar for CustomMessaging bricks contains the following:
<weblogic-enterprise-bean>
<ejb-name>CustomMessagingBrick</ejb-name>
<stateless-session-descriptor>
<pool>
</pool>
<stateless-clustering>
</stateless-clustering>
</stateless-session-descriptor>
<transaction-descriptor>
</transaction-descriptor>
<enable-call-by-reference>True</enable-call-by-reference>
<jndi-name>Service2</jndi-name>
</weblogic-enterprise-bean>.... -
Is there a way not to have to chose an available server in the console when deploying an ejb?
Is there a way not to have to chose an available server in the console when deploying
an ejb? Everytime we deploy our beans we have to logon to the console select the
ejb and then chose a server under the tab targets? Can this be automated?You could try to select the target in the config.xml file, but this is
not recommended by BEA.
Nils
Fred Bloggs wrote:
>
Is there a way not to have to chose an available server in the console when deploying
an ejb? Everytime we deploy our beans we have to logon to the console select the
ejb and then chose a server under the tab targets? Can this be automated?--
============================
[email protected] -
Weblogic 10.3.0 Deployment error when using ejb-jar.xml
Hi,
I am getting the following error while deploying my EJB3 application on Weblogic 10.3.0. This is happening only if I include ejb-jar.xml.
As per the EJB3 descriptor spec, Remote Home or Local home are not exists.
Is this a issue in Weblogic 10.3.0 or am I missing any special setup ?
Please help.
weblogic.application.ModuleException: Exception preparing module: EJBModule(egm-poc.jar)
Unable to deploy EJB: C:\appsrv\domains\WeblogicRS1.1-domain\servers\admin\tmp\_WL_user\_appsdir_egmear_ear\ot2591\egm-poc.
jar from egm-poc.jar:
In EJB JPATestBean, both the remote home and remote component interface must be specified. Currently, only one of them is spec
ified.
at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:452)
at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:93)
at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:387)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:58)
My ejb-jar.xml is
- <ejb-jar version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd">
<description>JPA Test Application</description>
<display-name>JPATest</display-name>
- <enterprise-beans>
- <session>
<ejb-name>JPATestBean</ejb-name>
<remote>egm.poc.jpa.JPATestBeanRemote</remote>
<local>egm.poc.jpa.JPATestBeanLocal</local>
<ejb-class>egm.poc.jpa.JPATestBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</session>
- <session>
<ejb-name>AuditInfoDAOH</ejb-name>
<local>egm.poc.jpa.Audit</local>
<ejb-class>egm.poc.jpa.AuditInfoDAOH</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</session>
</enterprise-beans>
- <assembly-descriptor>
- <container-transaction>
- <method>
<ejb-name>JPATestBean</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>RequiresNew</trans-attribute>
</container-transaction>
- <container-transaction>
- <method>
<ejb-name>AuditInfoDAOH</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
Regards
SajiHi,
Seems the issue is not common. Can anyone throw some light on this ?
Regards
Saji
Maybe you are looking for
-
Importing Playlists from an older version itunes
I have a new machine and installed the latest itunes. I have the backup files of itunes from two old machines that are no longer available. I was able to drag/drop the music in no problem. The old itunes backups each have a folder called playlists an
-
Why is Skype ... ?! I wish there still was functionality of Live Messenger! But get to the problem. First: how to link up my Skype accoun with Outlook account? When i get logged to live:login it shows that the account is connected together with my Mi
-
Mac Book Air, cannot exit Voice Over at initial start up
New Mac Book Air; initial power-up; selected English language; 'Welcome' screen defaults to 'United States'; cannot manually 'Continue' to register and set up; 'esc' results in starting the Voice Over tutorial; 'Command+F5' results in seeing/hearing
-
Struggle with tiff2icns command
Ladies and gents, I'm playing around with tiff2icns command and unfortunately not having much of luck despite it is pretty simple command. When I do "tiff2icns filemane.tiff filenime.icns" it creates empty .icns file. But if I use -noLarge argument t
-
HT201328 Cannot unlock my iphone 3gs.
I cant unlock my iphone 3gs. I have requested to unlock thru o2 and have reieved email confirming from apple that my iphone has been set to unlock. I have tried every options and still unable to unlock my phone, can anyone please help me. Thanks.