Exception in deployment of ejb ear
Hi All ...
I am getting this exception while deploying an ear which contains a call to the entity bean from a session bean , does anybody have an idea where the things are going wrong :
code:
09:44:13,765 WARN [ServiceController] Problem starting service jboss.j2ee:service=EJB3,module=persist.jar
java.lang.RuntimeException: You did not specify a @Resource.mappedName() on private javax.persistence.EntityManagerFactory src.FirstSessionBean.emf and there is no binding for enc name env/src.FirstSessionBean/emf in XML
at org.jboss.injection.ResourceHandler.handlePropertyAnnotation(ResourceHandler.java:506)
at org.jboss.injection.ResourceHandler.handleFieldAnnotations(ResourceHandler.java:325)
at org.jboss.injection.InjectionUtil.processFieldAnnotations(InjectionUtil.java:137)
at org.jboss.injection.InjectionUtil.processAnnotations(InjectionUtil.java:174)
at org.jboss.ejb3.EJBContainer.processMetadata(EJBContainer.java:354)
at org.jboss.ejb3.SessionContainer.processMetadata(SessionContainer.java:120)
at org.jboss.ejb3.Ejb3Deployment.processEJBContainerMetadata(Ejb3Deployment.java:288)
at org.jboss.ejb3.Ejb3Deployment.start(Ejb3Deployment.java:338)
at org.jboss.ejb3.Ejb3Module.startService(Ejb3Module.java:91)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
at sun.reflect.GeneratedMethodAccessor17.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:417)
at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
My code goes like this (I have put it in a servlet) ::
code:
// set the JNDI Properties
Properties props = new Properties();
props.setProperty("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
props.setProperty("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
props.setProperty("java.naming.provider.url", "localhost:1099");
// Session mySession= SessionManager.getManager().getSession("comics");
// ((JNDIConnector)((Session) mySession).getLogin().getConnector()).setLookupType(JNDIConnector.STRING_LOOKUP);
// invoke the session bean object
try {
Context context = new InitialContext(props);
// DatabaseLogin login = (DatabaseLogin)mySession.getProject().getLogin();
// javax.sql.DataSource ds = (javax.sql.DataSource) context.lookup("java:system");
// System.out.println("Data Source "+ds);
// JNDIConnector connector = new JNDIConnector(ds);
// login.setConnector(connector);
src.FirstSession myBeabObj = (src.FirstSession) context.lookup("sample123/FirstSessionBean/remote");
myBeabObj.sayHello(Name, Age, Dept);
PrintWriter pwWriter = response.getWriter();
pwWriter.println("Before calling Persistence");
// new entityCaller().persistEntity(Name, iAge);
pwWriter.println("After calling Persistence");
pwWriter.println("new Deployment"+System.currentTimeMillis());
pwWriter.println("You submitted Age"+Name);
pwWriter.println("You submitted Age"+Age);
pwWriter.println("You submitted Age"+Dept);
// pwWriter.println("The Bean returned this value"+myBeabObj.sayHello(Name , Age , Dept ));
System.out.println("Finished Transaction");
} catch (NamingException e) {
System.out.println("Exception Reached");
e.printStackTrace();
}// end of try catch block
You should probably try a JBoss forum. They're on http://www.jboss.com/index.html?module=bb.
Similar Messages
-
Exception while deploying application(as EAR file) on Standalone WLS 10.3
Hi,
I'm struggling with an exception while deploying my application(as EAR file) on a standalone WebLogic Server 10.3. I have developed a application using Trinidad and JSF components. But an exception occurs while deploying my application(as EAR file) in WebLogic Server 10.3. As I'm not familiar with WEBLOGIC server I'm unable to analyse the exception.
Note - I'm attaching the StackTrace below
Please help me out from this isssue.
+[HTTP:101216]Servlet: *"Faces Servlet" failed to preload on startup in Web application: "iss"*. java.lang.NullPointerException at javax.faces.webapp.FacesServlet.init(FacesServlet.java:165) at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:283) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(Unknown Source) at weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:64) at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:58) at weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHelper.java:48) at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:521) at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:1893) at weblogic.servlet.internal.WebAppServletContext.loadServletsOnStartup(WebAppServletContext.java:1870) at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1790) at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:2999) at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1371) at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:468) at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37) at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60) at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200) at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:117) at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37) at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60) at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:27) at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:635) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37) at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:212) at weblogic.application.internal.EarDeployment.activate(EarDeployment.java:16) at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:162) at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79) at weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:569) at weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:140) at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:106) at weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:323) at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:820) at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1227) at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:436) at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:163) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:181) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(DeploymentReceiverCallbackDeliverer.java:12) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$2.run(DeploymentReceiverCallbackDeliverer.java:67) at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:516) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201) at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)+
Message icon - Error java.lang.NullPointerException:
Thanks
SukumarThese are set of jar files that are placed in WEB-INF/lib folder
jsf-api.jar
commons-net-1.4.1.jar
itext-1.4.2.jar
javax.servlet_1.0.0.0_2-5.jar
log4j-1.2.8.jar
lucene-core-2.0.0.jar
ojdbc5.jar
ojdl.jar
ojdl2.jar
orai18n-lcsd.jar
trinidad-api.jar
I think adf-faces-impl.jar is doesn't require for my application because we have migrated our application from ADF Faces to Trinidad.
Thanks
Sukumar -
Exception during deployment of EJB application
Hi Experts,
I'm deploying one EJB application which is giving following warning.
What's the cause of it?
Caught exception during application startup from SAP J2EE Engine's deploy service:
java.rmi.RemoteException: Error occurred while starting application asianpaints.com/bsApp and wait.
Reason: Clusterwide exception: server ID 8216350:com.sap.engine.services.ejb.exceptions.deployment.EJBDeploymentException: The DataSource for PersistenceManager J2EDB is not created.
at com.sap.engine.services.ejb.entity.pm.PersistenceManager.initDataSource(PersistenceManager.java:217)
at com.sap.engine.services.ejb.EJBAdmin.commitLoad(EJBAdmin.java:1112)
at com.sap.engine.services.ejb.EJBAdmin.prepareStart(EJBAdmin.java:2428)
at com.sap.engine.services.deploy.server.application.StartTransaction.prepareCommon(StartTransaction.java:239)
at com.sap.engine.services.deploy.server.application.StartTransaction.prepare(StartTransaction.java:187)
at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhasesOnOneServer(ApplicationTransaction.java:301)
at com.sap.engine.services.deploy.server.application.ParallelAdapter.makeAllPhasesImpl(ParallelAdapter.java:327)
at com.sap.engine.services.deploy.server.application.ParallelAdapter.runInTheSameThread(ParallelAdapter.java:111)
at com.sap.engine.services.deploy.server.application.ParallelAdapter.makeAllPhasesAndWait(ParallelAdapter.java:230)
at com.sap.engine.services.deploy.server.DeployServiceImpl.startApplicationAndWait(DeployServiceImpl.java:4700)
at com.sap.engine.services.deploy.server.DeployServiceImpl.startApplicationAndWait(DeployServiceImpl.java:4605)
at com.sap.engine.services.deploy.server.DeployServiceImpl.startApplicationAndWait(DeployServiceImpl.java:4578)
at com.sap.engine.services.deploy.server.DeployServiceImplp4_Skel.dispatch(DeployServiceImplp4_Skel.java:1163)
at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:304)
at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:193)
at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:122)
at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
Caused by: com.sap.engine.services.jndi.persistent.exceptions.NamingException: Exception during lookup operation of object with name ejbContainer/cmp/tx/asianpaints.com/bsApp/J2EDB, cannot resolve object reference. [Root exception is com.sap.engine.services.connector.exceptions.BaseResourceException: ConnectionFactory "J2EDB" does not exist. Possible reasons: the connector in which ConnectionFactory "J2EDB" is defined is not deployed or not started.]
at com.sap.engine.services.jndi.implclient.ClientContext.lookup(ClientContext.java:529)
at com.sap.engine.services.jndi.implclient.ClientContext.lookup(ClientContext.java:639)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at com.sap.engine.services.ejb.entity.pm.PersistenceManager.initDataSource(PersistenceManager.java:185)
... 21 more
Caused by: com.sap.engine.services.connector.exceptions.BaseResourceException: ConnectionFactory "J2EDB" does not exist. Possible reasons: the connector in which ConnectionFactory "J2EDB" is defined is not deployed or not started.
at com.sap.engine.services.connector.ResourceObjectFactory.getObjectInstance(ResourceObjectFactory.java:207)
at com.sap.engine.system.naming.provider.ObjectFactoryBuilderImpl._getObjectInstance(ObjectFactoryBuilderImpl.java:72)
at com.sap.engine.system.naming.provider.ObjectFactoryBuilderImpl.access$100(ObjectFactoryBuilderImpl.java:31)
at com.sap.engine.system.naming.provider.ObjectFactoryBuilderImpl$DispatchObjectFactory.getObjectInstance(ObjectFactoryBuilderImpl.java:210)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:280)
at com.sap.engine.services.jndi.implclient.ClientContext.lookup(ClientContext.java:414)
... 25 more
Pls help as im waiting for your reply...
regards,
AmeyHi Yordan,
This is where im specifying my datasource in persistent.xml file(that is in "General tab" of EJB DC)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE persistent-ejb-map SYSTEM "persistent.dtd">
<persistent-ejb-map>
<locking
type="Table"/>
<db-properties>
<data-source-name>J2EDB</data-source-name>
</db-properties>
<entity-beans>
<entity-bean>
<ejb-name>OEMBean</ejb-name> -
Error Deploying Application - ejb-link or jndi-name
I get the following error when depoying my J2EE application. Can anyone help ?
Deployment failed on Server MServer1
weblogic.management.DeploymentException:
Exception:weblogic.management.ApplicationException: activate failed for Supplier
Module: Supplier Error: weblogic.management.DeploymentException: Could not setup environment - with nested exception:
[weblogic.deployment.EnvironmentException: ejb-ref ejb/ReceiverSes requires an ejb-link or jndi-name]
weblogic.deployment.EnvironmentException: ejb-ref ejb/ReceiverSes requires an ejb-link or jndi-name
at weblogic.deployment.EnvironmentBuilder.addEJBReferences(EnvironmentBuilder.java:473)
at weblogic.servlet.internal.CompEnv.init(CompEnv.java:123)
at weblogic.servlet.internal.WebAppServletContext.activate(WebAppServletContext.java:5616)
at weblogic.servlet.internal.WebAppServletContext.setActive(WebAppServletContext.java:5588)
at weblogic.servlet.internal.WebAppModule.activate(WebAppModule.java:841)
at weblogic.j2ee.J2EEApplicationContainer.activateModule(J2EEApplicationContainer.java:3127)
at weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContainer.java:2081)
at weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContainer.java:2062)
at weblogic.management.deploy.slave.SlaveDeployer$ComponentActivateTask.activateContainer(SlaveDeployer.java:2592)
at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.doCommit(SlaveDeployer.java:2515)
at weblogic.management.deploy.slave.SlaveDeployer$Task.commit(SlaveDeployer.java:2317)
at weblogic.management.deploy.slave.SlaveDeployer$Task.checkAutoCommit(SlaveDeployer.java:2399)
at weblogic.management.deploy.slave.SlaveDeployer$Task.prepare(SlaveDeployer.java:2311)
at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(SlaveDeployer.java:2479)
at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:798)
at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDeployer.java:507)
at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:465)
at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:25)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
--------------- nested within: ------------------
weblogic.management.DeploymentException: Could not setup environment - with nested exception:
[weblogic.deployment.EnvironmentException: ejb-ref ejb/ReceiverSes requires an ejb-link or jndi-name]
at weblogic.servlet.internal.CompEnv.init(CompEnv.java:133)
at weblogic.servlet.internal.WebAppServletContext.activate(WebAppServletContext.java:5616)
at weblogic.servlet.internal.WebAppServletContext.setActive(WebAppServletContext.java:5588)
at weblogic.servlet.internal.WebAppModule.activate(WebAppModule.java:841)
at weblogic.j2ee.J2EEApplicationContainer.activateModule(J2EEApplicationContainer.java:3127)
at weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContainer.java:2081)
at weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContainer.java:2062)
at weblogic.management.deploy.slave.SlaveDeployer$ComponentActivateTask.activateContainer(SlaveDeployer.java:2592)
at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.doCommit(SlaveDeployer.java:2515)
at weblogic.management.deploy.slave.SlaveDeployer$Task.commit(SlaveDeployer.java:2317)
at weblogic.management.deploy.slave.SlaveDeployer$Task.checkAutoCommit(SlaveDeployer.java:2399)
at weblogic.management.deploy.slave.SlaveDeployer$Task.prepare(SlaveDeployer.java:2311)
at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(SlaveDeployer.java:2479)
at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:798)
at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDeployer.java:507)
at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:465)
at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:25)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)I found the issue. The below entries were missing from weblogic.xml
<ejb-reference-description>
<ejb-ref-name>ejb/PipelineExecutor</ejb-ref-name>
<jndi-name>${APPNAME}.BEA_personalization.PipelineExecutor</jndi-name>
</ejb-reference-description>
"rohit" <[email protected]> wrote:
>
Does anyone knows why we would get the below error. I verified the web.xml
and
it seems to be right. Any help appreciated. Rohit
<Jul 1, 2003 5:08:12 PM PDT> <Error> <Deployer> <149231> <The slave deployer
was
unable to set the activation state to true for the application portalApp
weblogic.management.ApplicationException: activate failed forceoportal
Module Name: ceoportal, Error: weblogic.j2ee.DeploymentException: Could
not setu
p environment - with nested exception:
[weblogic.deployment.EnvironmentException: ejb-ref ejb/PipelineExecutor
requires
an ejb-link or jndi-name]
at weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContai
ner.java:1093)
at weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContai
ner.java:1022)
at weblogic.management.deploy.slave.SlaveDeployer.setActivationStateForA
llApplications(SlaveDeployer.java:617)
at weblogic.management.deploy.slave.SlaveDeployer.resume(SlaveDeployer.j
ava:376)
at weblogic.management.deploy.DeploymentManagerServerLifeCycleImpl.resum
e(DeploymentManagerServerLifeCycleImpl.java:235)
at weblogic.t3.srvr.ServerLifeCycleList.resume(ServerLifeCycleList.java:
65)
at weblogic.t3.srvr.T3Srvr.resume(T3Srvr.java:832)
at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:300)
at weblogic.Server.main(Server.java:32) -
WL8.1 crashed during deployment of EJB from ear file
Hello,
WL8.1 crashed during deployment of EJB from ear file on SunOs 5.8:
error: Invalid class file format in /export/home/bea/j2sdk1.4.1_03/jre/lib/rt.jar(java/lang/AssertionError.class).
The major.minor version '48.0' is too recent for this tool to understand.
/export/home/mydomain/./ep1/.wlnotdelete/EJBCompilerCache/1xd25ws3hwp86/mydomain/facade/payroll/PayrollFL_vww01c_HomeImpl.java:83:
Class java.lang.AssertionError not found.
throw new AssertionError("Unable to find expected "+
Thanks,
Oleg.Thank you Mark,
It works now.
Oleg.
"Mark Griffith" <[email protected]> wrote:
I don't think though that _03 is the problem, you should have compatability
between minor versions of a VM release. How did you deploy the ear?
Did
you copy over from a 7.0 domain? It looks like the EJB was built on
a
previous version of WLS, or has not had "ejbc" run on it prior to
deployment. Try running weblogic.appc foo.ear or fooExplodedEar. And
then
try redeploying. To be sure everything is clean rm -rf .wldonotdelete
after
you shut the server down.
cheers
mbg
"Oleg" <[email protected]> wrote in message
news:3ef54653$[email protected]..
Hello,
WL8.1 crashed during deployment of EJB from ear file on SunOs 5.8:
error: Invalid class file format in/export/home/bea/j2sdk1.4.1_03/jre/lib/rt.jar(java/lang/AssertionError.class
The major.minor version '48.0' is too recent for this tool to understand.
/export/home/mydomain/./ep1/.wlnotdelete/EJBCompilerCache/1xd25ws3hwp86/mydo
main/facade/payroll/PayrollFL_vww01c_HomeImpl.java:83:
Class java.lang.AssertionError not found.
throw new AssertionError("Unable to find expected "+
Thanks,
Oleg. -
EJB deployment problems using ear
Hi,
I am able to deploy the ejbs in exploded format, but when I deploy
them in an ear, I see 'EJB Deployed message' on the start up console.
But when my servlet is trying to create the EJB, I am getting
CreateException. What is the reason for that?
Thanks,
Mark PlutaMark
You'll probably receive more help if you print out the stack trace... in the meanwhile..
there are some things to make sure.. verify that in the application.xml of your
ear file you have your ejb's declared, in the console view the JNDI tree and make
sure that the ejb's are on there as well.. viewing the stacktrace might be able
to get you more help though
Chris
Mark Pluta <[email protected]> wrote:
Hi,
I am able to deploy the ejbs in exploded format, but when I deploy
them in an ear, I see 'EJB Deployed message' on the start up console.
But when my servlet is trying to create the EJB, I am getting
CreateException. What is the reason for that?
Thanks,
Mark Pluta -
Hi all,
i try to deploy my first EJB / EAR Project as described in SAP Help.
But after clicking "Finish" to start the WebService Deployment, i get to the status window with the message:
.... Starting deployment
and the progress bar(s) are shown up.
But nothing happens, my CPU goes up to 100% usage and the progress bars are running endless. I thought it will last some time, but after 2 hours of running i quit the process hard in the task manager.
I currently using a IBM T40p with 1GB RAM and 1,5 GHz CPU, another GB Ram is ordered.
Any hints or is my Hardware just too "low"
edit: In my AS Status Window i had an red AS Java Thread, with the taskname "DeployController(111) and Subtask "deploy(java.lang.String....) perhaps this would helpThx for your reply.
Last Friday i noticed the same solution as you
Its really annoying to wait hours till the deploy process is finishing and with this little "trick" its done after few minutes.
Hope this bug will be fixed in the final version (if it is a bug )
so long -
Exceptions in deploying ThreeEJB Hotel sample
When I use JDeveloper to deploy ThreeEJBHotel to "Connection" I
encounter the following exceptions. I am looking for
suggestions from other developers or Oracle tech support.
The OS is Windows 2000 advanced server.
Thank you very much.
Beginning deployment to Oracle9i Application Server...
Wrote EJB .jar file to
D:\ORACLE_HOME\j2ee\home\applications\ThreeEJBHotel\src\oracle\ot
nsamples\ThreeEJBHotel\ThreeEJBHotel-ejb.jar
D:\oracle\ora81\jdev\jdk1.3\jre\bin\javaw.exe -jar
D:\oracle\ora81\jdev\lib\admin.jar ormi://IL92-4088/ admin **** -
deploy -file
D:\ORACLE_HOME\j2ee\home\applications\ThreeEJBHotel\src\oracle\ot
nsamples\ThreeEJBHotel\ThreeEJBHotel.ear -deploymentName
ThreeEJBHotel
Wrote EJB .ear file to
D:\ORACLE_HOME\j2ee\home\applications\ThreeEJBHotel\src\oracle\ot
nsamples\ThreeEJBHotel\ThreeEJBHotel.ear
Invoking Oracle9iAS admin tool...
Auto-unpacking
D:\ORACLE_HOME\j2ee\home\applications\_ThreeEJBHotel.ear... done.
Auto-deploying ThreeEJBHotel (Assembly had been updated)...
java.lang.InstantiationException: Unknown entity subtag: primary-
field
at
com.evermind.server.ejb.deployment.EntityBeanDescriptor.<init>
(EntityBeanDescriptor.java:108)
at
com.evermind.server.ejb.deployment.EJBPackage.parseEnterpriseBean
s(EJBPackage.java:475)
at
com.evermind.server.ejb.deployment.EJBPackage.parseMainNode
(EJBPackage.java:369)
at com.evermind.xml.XMLConfig.parseRootNode
(XMLConfig.java:256)
at com.evermind.xml.XMLConfig.init(XMLConfig.java:142)
at com.evermind.server.ServerComponent.init
(ServerComponent.java:178)
at
com.evermind.server.ejb.EJBPackageDeployment.getPackage
(EJBPackageDeployment.java:534)
at
com.evermind.server.administration.ServerApplicationInstallation.
finish(ServerApplicationInstallation.java:397)
at java.lang.reflect.Method.invoke(Native Method)
at com.evermind.server.rmi.RMICallHandler.run
(RMICallHandler.java:66)
at com.evermind.util.ThreadPoolThread.run
(ThreadPoolThread.java:62)
Exit status of Oracle9iAS admin tool: 0
---- Deployment finished. ----Hi Allen,
I assume you have followed the steps given in the readme.html
file, like creating EJBs in the first project, then creating a
web.jpr for the client and so on. In the course of this, you
would also have created an app server connection, where you would
have mentioned the host of your OC4J server, username, password
etc. After that you would have created a deployment profile for
the EJB, where you would have mentioned the EAR and EJB-Jar
file.Then you would have right clicked on the deployment profile
and clicked deploy. Just to reiterate the steps. Can you clearly
say at what point you get this exception?
Cheers
--Rajesh -
[EJB:011055]Error deploying the EJB with error that JNDI name already inuse
Hi,
I have written a trivial application consisting of 4 stateless beans and 1 MDB. The ear is developed from some code generator tool and works fine if I directly deploy on weblogic server 812.
But in order to learn Weblogic Workshop I created new Application and EJB project. Then I imported the EJB jar and provided other source files.
From Weblogic Workshop I could generate the ear successfully. But while trying to deploy the ear I get the following exception :
<16/03/2005 10:02:38 PM GMT+05:30> <Error> <Deployer> <BEA-149201> <Failed to complete the deployment task with ID 1 for the application hsbc.
weblogic.management.ApplicationException:
Exception:weblogic.management.ApplicationException: prepare failed for MCAppBEAN.jar
Module: MCAppBEAN.jar Error: Exception preparing module: EJBModule(MCAppBEAN.jar,status=NEW)
Unable to deploy EJB: StatelessBean from MCAppBEAN.jar:
<b>[EJB:011055]Error deploying the EJB 'StatelessBean(Application: hsbc, EJBComponent: MCAppBEAN.jar)', the JNDI name 'StatelessBeanHSBC' is already in use. You mu
st set a different JNDI name in the weblogic-ejb-jar.xml deployment descriptor for this EJB before it can be deployed.</b> at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.createContainer(SlaveDeployer.java:2556)
at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(SlaveDeployer.java:2474)
at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:798)
at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDeployer.java:507)
at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:465)
at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:25)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
--------------- nested within: ------------------
<b>Can someone tell where have I made the mistake?</b>
thanks in advance.Try to undeploy and un target the applcation via WLS console and they try to deploy it again. Or just try to redeploy it.
-
Deployment of new EAR not successful as changes are invisible
Hi,
Our application is deployed as an EAR, which internally consists of JARs and EJBs. We do not have a control on the code as it is provided by a third party vendor.
Until recently we were using Welogic 9.2 and everytime we get a new EAR, we replace the old file on the filesystem with the new one and then Stop-Start the Admin server using backend scripts and the changes would be visible.
We recently upgraded to Weblogic 10.3 and were able to deploy the existing EAR without any issues. When the time came to replace the EAR, the same action mentioned above doesn't seem to work. While the application startsup fine, the changes aren't visible and it seems as though the deployment is still pointing to the old EAR. We have verified that the deployment is pointing to the correct EAR and also tried this a couple of times, but without any luck.
The console and AdminServer logs are also clean. I also checked the documentation to verify if the deployment process has changed, but couldn't notice any relevant updates.
Please let me know if I am missing some step or if you have any suggestions.
Regards,
RaghuHi,
Thanks for your suggestions.
When I had first replaced the EAR - I had restarted the app server and it looked like the application had been installed successfully. Then I remember performing an "Update" and it failed due to "PermGen space". Then I deleted and installed the application again and it worked fine.
Since delete/install re-deploys the application, I thought that it had worked fine and ignored the "PermGen space" error. But in reality, it looks like the old EAR's classes are still active - based on the front-end result.
That is history. Today, based on your suggestion, I directly tried to "Update" existing application (with the new EAR). It constantly failed with different exceptions and the most common one being "PermGen space". Some other exceptions are listed below. Each of these were faced during different attempts to "Update" the application.
- weblogic.application.ModuleException: Exception starting module: EJBModule(norkom_wlm_ejb.jar) - PermGen space
- weblogic.application.ModuleException: [HTTP:101216]Servlet: "configuratorInitServlet" failed to preload on startup in Web application: "norkom_cms_us".
java.lang.NullPointerException
- weblogic.application.ModuleException: Exception preparing module: EJBModule(norkom_base_ejb.jar) - PermGen space
Once when I tried to "Delete" the application, I faced the below error.
- com.bea.netuix.nf.UIControlException: com.bea.netuix.nf.UIControlException: Could not retrieve PageFlow for uri [com/bea/console/actions/app/install/Flow.jpf] for portlet [AppApplicationInstallPortlet].
Since the "java.lang.OutOfMemoryError: PermGen space" error was the most common and since increasing the value of the MEM_ARGS field in setDomainEnv.sh helped with Weblogic 9.2, I decided to do the same in 10.3 Below is how it looks now. I have highlighted the lines which were changed by me. As I don't understand their terminologies, I adopted a trial-error method.
MEM_ARGS="-Xms2048m -Xmx3072m" *********** Raghu ***********
export MEM_ARGS *********** Raghu ***********
if [ "${JAVA_VENDOR}" = "Sun" ] ; then
#WLS_MEM_ARGS_64BIT="-Xms256m -Xmx512m"
WLS_MEM_ARGS_64BIT="-Xms2048m -Xmx3072m" *********** Raghu ***********
export WLS_MEM_ARGS_64BIT
#WLS_MEM_ARGS_32BIT="-Xms256m -Xmx512m"
WLS_MEM_ARGS_32BIT="-Xms2048m -Xmx3072m" *********** Raghu ***********
export WLS_MEM_ARGS_32BIT
else
WLS_MEM_ARGS_64BIT="-Xms512m -Xmx512m"
export WLS_MEM_ARGS_64BIT
WLS_MEM_ARGS_32BIT="-Xms512m -Xmx512m"
export WLS_MEM_ARGS_32BIT
fi
MEM_ARGS_64BIT="${WLS_MEM_ARGS_64BIT}"
export MEM_ARGS_64BIT
MEM_ARGS_32BIT="${WLS_MEM_ARGS_32BIT}"
export MEM_ARGS_32BIT
if [ "${JAVA_USE_64BIT}" = "true" ] ; then
MEM_ARGS="${MEM_ARGS_64BIT}"
export MEM_ARGS
else
MEM_ARGS="${MEM_ARGS_32BIT}"
export MEM_ARGS
fi
MEM_PERM_SIZE_64BIT="-XX:PermSize=128m"
export MEM_PERM_SIZE_64BIT
MEM_PERM_SIZE_32BIT="-XX:PermSize=48m"
export MEM_PERM_SIZE_32BIT
if [ "${JAVA_USE_64BIT}" = "true" ] ; then
MEM_PERM_SIZE="${MEM_PERM_SIZE_64BIT}"
export MEM_PERM_SIZE
else
MEM_PERM_SIZE="${MEM_PERM_SIZE_32BIT}"
export MEM_PERM_SIZE
fi
#MEM_MAX_PERM_SIZE_64BIT="-XX:MaxPermSize=256m"
MEM_MAX_PERM_SIZE_64BIT="-XX:MaxPermSize=3072m" *********** Raghu ***********
export MEM_MAX_PERM_SIZE_64BIT
After doing this, "Updating" even the old EAR is consistently failing, mainly with the "PermGen space" error. Hence I am totally stuck and clueless how to proceed.
Please let me know your thoughts.
Regards,
Raghu -
Cannot deploy a EJB 3.0 Session bean to the OAS 10.1.3.4
Hi All,
I am unable to deploy a EJB 3.0 Session bean with no deployment descriptors to OAS 10.1.3.4 App server.This Session bean is also exposed as a web service using annotations. I am able to deploy this bean to a standalone oc4j 10.1.3.x containers and test it successfully.
i have written a simple stateless session bean ( exposed as webservice) and every bean is having issues with deployment having the same exception stated below
Can some one please help as i need to deploy this urgently.
below is the session bean code:
import javax.ejb.Stateless;
@Stateless(name="SiebelQuoteEJB")
public class SiebelQuoteEJBBean implements SiebelQuoteEJBLocal,
SiebelQuoteEJBWebService {
public SiebelQuoteEJBBean() {
public String publishMessage(String message,String type) throws java.rmi.RemoteException {
client.publishMessage(message,type);
return "SUCCESS";
Below is the error while deploying:
11/01/06 15:03:49 WARNING: Application.setConfig Application: javasso is in failed state as initialization failed.
java.lang.NullPointerException
11/01/06 15:03:50 WARNING: Application.setConfig Application: SiebelQuoteEJB is in failed state as initialization failed.
java.lang.InstantiationException: Error initializing ejb-modules: null Error parsing application-server config file: null
11/01/06 15:03:50 java.lang.NullPointerException
at com.evermind.server.ObjectReferenceCleaner.cleanupApplicationLogLevels(ObjectReferenceCleaner.java:166)
at com.evermind.server.ObjectReferenceCleaner.loaderDestroyed(ObjectReferenceCleaner.java:88)
at oracle.classloader.EventDispatcher.loaderDestroyed(EventDispatcher.java:248)
at oracle.classloader.PolicyClassLoader.close(PolicyClassLoader.java:1113)
at oracle.classloader.PolicyClassLoader.close(PolicyClassLoader.java:1041)
at com.evermind.server.ApplicationStateRunning.destroyClassLoaders(ApplicationStateRunning.java:1171)
at com.evermind.server.Application.stateCleanUp(Application.java:3635)
at com.evermind.server.Application.setConfig(Application.java:506)
at com.evermind.server.Application.setConfig(Application.java:355)
at com.evermind.server.ApplicationServer.addApplication(ApplicationServer.java:1895)
at com.evermind.server.ApplicationServer.initializeDeployedApplications(ApplicationServer.java:1651)
at com.evermind.server.ApplicationServer.setConfig(ApplicationServer.java:1034)
at com.evermind.server.ApplicationServerLauncher.run(ApplicationServerLauncher.java:131)
at java.lang.Thread.run(Thread.java:736)which jdk version? Had this with 1.6 and had to install an up-to-date jdbc.
-
Exception while deploying webservice to weblogic 10.3.6
Hi
i am facing following exception while deploying ear file to weblogic.
the same ear files was working in weblogic 9.2
bundle of thanks for your help
<Error> <Deployer> <BEA-149265> <Failure occ
urred in the execution of deployment request with ID '1370278887285' for task '1
'. Error is: 'weblogic.management.DeploymentException: Error encountered during
prepare phase of deploying WebService module 'SubscriptionService.war'. Error en
countered while deploying WebService module 'SubscriptionService.war'. port com
ponent 'SubscriptionServicePortImpl' - wsdl port:{http://com.irondata.subscriptio
n/service}SubscriptionServicePortImplPort is not found in wsdl.'
weblogic.management.DeploymentException: Error encountered during prepare phase
of deploying WebService module 'SubscriptionService.war'. Error encountered whil
e deploying WebService module 'SubscriptionService.war'. port component 'Subscr
iptionServicePortImpl' - wsdl port:{http://com.irondata.subscription/service}Subs
criptionServicePortImplPort is not found in wsdl.
at weblogic.wsee.deploy.WSEEModule.prepare(WSEEModule.java:149)
at weblogic.wsee.deploy.AppDeploymentExtensionFactory.prepare(AppDeploym
entExtensionFactory.java:79)
at weblogic.wsee.deploy.AppDeploymentExtensionFactory.access$100(AppDepl
oymentExtensionFactory.java:15)
at weblogic.wsee.deploy.AppDeploymentExtensionFactory$1.prepare(AppDeplo
ymentExtensionFactory.java:219)
at weblogic.application.internal.flow.AppDeploymentExtensionFlow.prepare
(AppDeploymentExtensionFlow.java:23)
Truncated. see log file for complete stacktrace
Caused By: weblogic.wsee.ws.WsException: Error encountered while deploying WebSe
rvice module 'SubscriptionService.war'. port component 'SubscriptionServicePort
Impl' - wsdl port:{http://com.irondata.subscription/service}SubscriptionServicePo
rtImplPort is not found in wsdl.
at weblogic.wsee.deploy.WSEEModule.verifyWsdd(WSEEModule.java:256)
at weblogic.wsee.deploy.WSEEModule.prepare(WSEEModule.java:121)
at weblogic.wsee.deploy.AppDeploymentExtensionFactory.prepare(AppDeploym
entExtensionFactory.java:79)
at weblogic.wsee.deploy.AppDeploymentExtensionFactory.access$100(AppDepl
oymentExtensionFactory.java:15)
at weblogic.wsee.deploy.AppDeploymentExtensionFactory$1.prepare(AppDeplo
ymentExtensionFactory.java:219)
Truncated. see log file for complete stacktraceThe following exception occurs when there is a mismatch with the portName in the impl class with the port name in WSDL.
weblogic.wsee.ws.WsException: Error encountered while deploying WebService module 'SubscriptionService.war'. port component 'SubscriptionServicePort
Impl' - wsdl port:{http://com.irondata.subscription/service}SubscriptionServicePortImplPort is not found in wsdl.
I found the Defect in the Oracle knowledge base logged for the issue. Patch id is 8182891 and fix is available for WLS 9.2.2.0 version.
Please download and apply the patch and let us know if it helps you.
Thanks,
Vijaya -
Error while deploying the EJB - JPA - Hibernate application
Hi guys,
i got following exception while deploying my application into the server. can anyone suggest me.
Failure occurred in the execution of deployment request with ID '1243505041748' for task '0'. Error is: 'java.lang.ClassNotFoundException: org.jboss.util.file.ArchiveBrowser$Filter' java.lang.ClassNotFoundException: org.jboss.util.file.ArchiveBrowser$Filter at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) at java.net.URLClassLoader.access$000(URLClassLoader.java:56) at java.net.URLClassLoader$1.run(URLClassLoader.java:195) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) at org.hibernate.ejb.Ejb3Configuration.scanForClasses(Ejb3Configuration.java:626) at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:350) at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:126) at weblogic.deployment.PersistenceUnitInfoImpl.createEntityManagerFactory(PersistenceUnitInfoImpl.java:330) at weblogic.deployment.PersistenceUnitInfoImpl.<init>(PersistenceUnitInfoImpl.java:123) at weblogic.deployment.AbstractPersistenceUnitRegistry.storeDescriptors(AbstractPersistenceUnitRegistry.java:331) at weblogic.deployment.AbstractPersistenceUnitRegistry.loadPersistenceDescriptor(AbstractPersistenceUnitRegistry.java:245) at weblogic.deployment.ModulePersistenceUnitRegistry.<init>(ModulePersistenceUnitRegistry.java:63) at weblogic.ejb.container.deployer.EJBModule.setupPersistenceUnitRegistry(EJBModule.java:209) at weblogic.ejb.container.deployer.EJBModule$1.execute(EJBModule.java:310) at weblogic.deployment.PersistenceUnitRegistryInitializer.setupPersistenceUnitRegistries(PersistenceUnitRegistryInitializer.java:62) at weblogic.servlet.internal.WebAppModule.prepare(WebAppModule.java:381) at weblogic.application.internal.flow.ScopedModuleDriver.prepare(ScopedModuleDriver.java:176) 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) at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:42) at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:615) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37) at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:191) at weblogic.application.internal.EarDeployment.prepare(EarDeployment.java:16) at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:155) at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:60) at weblogic.deploy.internal.targetserver.operations.ActivateOperation.createAndPrepareContainer(ActivateOperation.java:197) at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doPrepare(ActivateOperation.java:89) at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:217) at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:723) at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1190) at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare(DeploymentManager.java:248) at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepare(DeploymentServiceDispatcher.java:159) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:157) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$000(DeploymentReceiverCallbackDeliverer.java:12) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$1.run(DeploymentReceiverCallbackDeliverer.java:45) at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:516) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201) at weblogic.work.ExecuteThread.run(ExecuteThread.java:173) java.lang.ClassNotFoundException: org.jboss.util.file.ArchiveBrowser$Filter at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) at java.net.URLClassLoader.access$000(URLClassLoader.java:56) at java.net.URLClassLoader$1.run(URLClassLoader.java:195) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) at org.hibernate.ejb.Ejb3Configuration.scanForClasses(Ejb3Configuration.java:626) at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:350) at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:126) at weblogic.deployment.PersistenceUnitInfoImpl.createEntityManagerFactory(PersistenceUnitInfoImpl.java:330) at weblogic.deployment.PersistenceUnitInfoImpl.<init>(PersistenceUnitInfoImpl.java:123) at weblogic.deployment.AbstractPersistenceUnitRegistry.storeDescriptors(AbstractPersistenceUnitRegistry.java:331) at weblogic.deployment.AbstractPersistenceUnitRegistry.loadPersistenceDescriptor(AbstractPersistenceUnitRegistry.java:245) at weblogic.deployment.ModulePersistenceUnitRegistry.<init>(ModulePersistenceUnitRegistry.java:63) at weblogic.ejb.container.deployer.EJBModule.setupPersistenceUnitRegistry(EJBModule.java:209) at weblogic.ejb.container.deployer.EJBModule$1.execute(EJBModule.java:310) at weblogic.deployment.PersistenceUnitRegistryInitializer.setupPersistenceUnitRegistries(PersistenceUnitRegistryInitializer.java:62) at weblogic.servlet.internal.WebAppModule.prepare(WebAppModule.java:381) at weblogic.application.internal.flow.ScopedModuleDriver.prepare(ScopedModuleDriver.java:176) 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) at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:42) at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:615) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37) at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:191) at weblogic.application.internal.EarDeployment.prepare(EarDeployment.java:16) at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:155) at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:60) at weblogic.deploy.internal.targetserver.operations.ActivateOperation.createAndPrepareContainer(ActivateOperation.java:197) at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doPrepare(ActivateOperation.java:89) at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:217) at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:723) at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1190) at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare(DeploymentManager.java:248) at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepare(DeploymentServiceDispatcher.java:159) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:157) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$000(DeploymentReceiverCallbackDeliverer.java:12) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$1.run(DeploymentReceiverCallbackDeliverer.java:45) at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:516) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201) at weblogic.work.ExecuteThread.run(ExecuteThread.java:17
I am using
Hibernate 3.2
EJB 3
WebLogic 10.3
MyEclipse 6.6I think I've seen this before and I believe that it might the way Hibernate 3.2 loads classes. I seem to remember actually patching this myself using a fix someone made at one point and getting it to work, but that used to be documented on a dev2dev blog comment that is no longer around :(
Here are some hints on similar errors:
https://jira.jboss.org/jira/browse/EJBTHREE-719
http://forums.java.net/jive/thread.jspa?threadID=16472
Some Hibernate issues with ANTLR can be resolved if you can put all of the relevant classes in your web-inf/lib or app-inf/lib and use the appropriate deployment descriptors to "prefer" your classes.
http://download.oracle.com/docs/cd/E12839_01/wls/docs103/webapp/weblogic_xml.html#wp1059286
There are other similar errors that you might encounter
http://maniezhilan.blogspot.com/2008/02/hibernate-antlrjar-with-weblogic-server.html -
Deploying war OR ear file in 10.1.3 standalone OC4J
I've read the several threads on how to deploy a war file and/or ear file for OC4J but haven't seen anyone having the same issue I'm having.
I've tried deploying manually, from the command line using admin.jar, as well as the enterprise manager. It appears that when OC4J is looking for a jar file containing EJB's. But my app has none and there is no jar file that it finds.
Here is what the console reports when I try to deploy using admin.jar ->
http://www.gordongridley.us/2007/02/oc4j-console-when-trying-to-deploy.html
OK - so I try to deploy using the Enterprise Manager instead to see if the UI has some options that I can change for not forcing an EJB jar file lookup. Here is a video of what I did ->
http://www.gordongridley.us/2007/02/attempting-to-deploy-war-using-oc4j.html
Do I really need to have a jar file with EJB's to deploy a WAR/EAR file?Hi Gordon,
The source of your ills is this entry in the application.xml descriptor:
<module>
<ejb>TomaxCMAdmin.jar</ejb>
</module>
Remove that, and you should be good to go (assuming you aren't referencing any other non-existent JARs).
Thanks
Dan Hynes -
How deploy the EJB in security on the Sun Java System Application Server 9?
I hava deploied a simple Hello EJB Object on PE 9(Sun Java System Application Server Platform Edition 9). I can use this EJB object without user name an password On any client. See the following code section:
public static void main(String[] args) {
try{
Properties props = System.getProperties();
props.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.enterprise.naming.SerialInitContextFactory");
props.put(Context.PROVIDER_URL,"iiop://localhost:3700");
Context ctx = new InitialContext(props);
Hello h = (Hello) ctx.lookup("ejb/test/Hello");
System.out.println(h.sayHello());
}catch(Exception e){
e.printStackTrace();
Please tell me how deploy the EJB in security on the Sun Java System Application Server 9? So that, The client must set the user name and password when lookup the ejb object. Like the following:
props.put(Context.SECURITY_PRINCIPAL,"admin")
props.put(Context.SECURITY_CREDENTIALS,"1234");Guys,
I too have the same issue. If anyone has an answer, please let me know.
Is this GlassFish problem? or Prgram issue?
Find below the source code
package TransactionSecurity.bean;
import javax.annotation.Resource;
import javax.annotation.security.DeclareRoles;
import javax.annotation.security.PermitAll;
import javax.annotation.security.RolesAllowed;
import javax.ejb.Remote;
import javax.ejb.SessionContext;
import javax.ejb.Stateless;
import javax.ejb.TransactionAttribute;
import javax.ejb.TransactionAttributeType;
@Stateless
@Remote(TSCalculator.class)
@DeclareRoles({"student", "teacher"})
public class TSCalculatorBean implements TSCalculator {
private @Resource SessionContext ctx;
@PermitAll
// @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
public int add(int x, int y) {
System.out.println("CalculatorBean.add Caller Principal:" + ctx.getCallerPrincipal().getName());
return x + y;
@RolesAllowed( { "student" })
public int subtract(int x, int y) {
System.out.println("CalculatorBean.subtract Caller Principal:" + ctx.getCallerPrincipal().getName());
System.out.println("CalculatorBean.subtract isCallerInRole:" + ctx.isCallerInRole("student"));
return x - y;
@RolesAllowed( { "teacher" })
public int divide(int x, int y) {
System.out.println("CalculatorBean.divide Caller Principal:" + ctx.getCallerPrincipal().getName());
System.out.println("CalculatorBean.divide isCallerInRole:" + ctx.isCallerInRole("teacher"));
return x / y;
package TransactionSecurity.bean;
import javax.ejb.Remote;
@Remote
public interface TSCalculator {
public int add(int x, int y);
public int subtract(int x, int y);
public int divide(int x, int y);
package TransactionSecurity.client;
import java.util.Properties;
import javax.ejb.EJBAccessException;
import javax.naming.Context;
import javax.naming.InitialContext;
import TransactionSecurity.bean.TSCalculator;
public class TSCalculatorClient {
public static void main(String[] args) throws Exception {
// Establish the proxy with an incorrect security identity
Properties env = new Properties();
env.setProperty(Context.SECURITY_PRINCIPAL, "kabir");
env.setProperty(Context.SECURITY_CREDENTIALS, "validpassword");
env.setProperty(Context.INITIAL_CONTEXT_FACTORY,"com.sun.appserv.naming.S1ASCtxFactory");
env.setProperty(Context.PROVIDER_URL,"iiop://127.0.0.1:3700");
env.setProperty("java.naming.factory.initial","com.sun.enterprise.naming.SerialInitContextFactory");
env.setProperty("java.naming.factory.url.pkgs","com.sun.enterprise.naming");
env.setProperty("java.naming.factory.state","com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl");
env.setProperty("org.omg.CORBA.ORBInitialHost", "127.0.0.1");
env.setProperty("org.omg.CORBA.ORBInitialPort", "3700");
InitialContext ctx = new InitialContext(env);
TSCalculator calculator = null;
try {
calculator = (TSCalculator) ctx.lookup(TSCalculator.class.getName());
} catch (Exception e) {
System.out.println ("Error in Lookup");
e.printStackTrace();
System.exit(1);
System.out.println("Kabir is a student.");
System.out.println("Kabir types in the wrong password");
try {
System.out.println("1 + 1 = " + calculator.add(1, 1));
} catch (EJBAccessException ex) {
System.out.println("Saw expected SecurityException: "
+ ex.getMessage());
System.out.println("Kabir types in correct password.");
System.out.println("Kabir does unchecked addition.");
// Re-establish the proxy with the correct security identity
env.setProperty(Context.SECURITY_CREDENTIALS, "validpassword");
ctx = new InitialContext(env);
calculator = (TSCalculator) ctx.lookup(TSCalculator.class.getName());
System.out.println("1 + 1 = " + calculator.add(1, 1));
System.out.println("Kabir is not a teacher so he cannot do division");
try {
calculator.divide(16, 4);
} catch (javax.ejb.EJBAccessException ex) {
System.out.println(ex.getMessage());
System.out.println("Students are allowed to do subtraction");
System.out.println("1 - 1 = " + calculator.subtract(1, 1));
}The user kabir is created in the server and this user belongs to the group student.
Also, I have enabled the "Default Principal To Role Mapping"
BTW, I'm able to run other EJB3 examples [that does'nt involve any
security features] without any problems.
Below is the ERROR
Error in Lookupjavax.naming.NamingException: ejb ref resolution error for remote business interfaceTransactionSecurity.bean.TSCalculator [Root exception is java.rmi.AccessException: CORBA NO_PERMISSION 0 No; nested exception is:
org.omg.CORBA.NO_PERMISSION: ----------BEGIN server-side stack trace----------
org.omg.CORBA.NO_PERMISSION: vmcid: 0x0 minor code: 0 completed: No
at com.sun.enterprise.iiop.security.SecServerRequestInterceptor.handle_null_service_context(SecServerRequestInterceptor.java:407)
at com.sun.enterprise.iiop.security.SecServerRequestInterceptor.receive_request(SecServerRequestInterceptor.java:429)
at com.sun.corba.ee.impl.interceptors.InterceptorInvoker.invokeServerInterceptorIntermediatePoint(InterceptorInvoker.java:627)
at com.sun.corba.ee.impl.interceptors.PIHandlerImpl.invokeServerPIIntermediatePoint(PIHandlerImpl.java:530)
at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.getServantWithPI(CorbaServerRequestDispatcherImpl.java:406)
at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:224)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1846)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1706)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:1088)
at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:223)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:806)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.dispatch(CorbaMessageMediatorImpl.java:563)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.doWork(CorbaMessageMediatorImpl.java:2567)
at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:555)
----------END server-side stack trace---------- vmcid: 0x0 minor code: 0 completed: No]
at com.sun.ejb.EJBUtils.lookupRemote30BusinessObject(EJBUtils.java:425)
at com.sun.ejb.containers.RemoteBusinessObjectFactory.getObjectInstance(RemoteBusinessObjectFactory.java:74)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:403)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at TransactionSecurity.client.TSCalculatorClient.main(TSCalculatorClient.java:35)
Caused by: java.rmi.AccessException: CORBA NO_PERMISSION 0 No; nested exception is:
org.omg.CORBA.NO_PERMISSION: ----------BEGIN server-side stack trace----------
org.omg.CORBA.NO_PERMISSION: vmcid: 0x0 minor code: 0 completed: No
at com.sun.enterprise.iiop.security.SecServerRequestInterceptor.handle_null_service_context(SecServerRequestInterceptor.java:407)
at com.sun.enterprise.iiop.security.SecServerRequestInterceptor.receive_request(SecServerRequestInterceptor.java:429)
at com.sun.corba.ee.impl.interceptors.InterceptorInvoker.invokeServerInterceptorIntermediatePoint(InterceptorInvoker.java:627)
at com.sun.corba.ee.impl.interceptors.PIHandlerImpl.invokeServerPIIntermediatePoint(PIHandlerImpl.java:530)
at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.getServantWithPI(CorbaServerRequestDispatcherImpl.java:406)
at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:224)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1846)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1706)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:1088)
at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:223)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:806)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.dispatch(CorbaMessageMediatorImpl.java:563)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.doWork(CorbaMessageMediatorImpl.java:2567)
at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:555)
----------END server-side stack trace---------- vmcid: 0x0 minor code: 0 completed: No
at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.mapSystemException(Util.java:277)
at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.privateInvoke(StubInvocationHandlerImpl.java:205)
at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:152)
at com.sun.corba.ee.impl.presentation.rmi.bcel.BCELStubBase.invoke(BCELStubBase.java:225)
at com.sun.ejb.codegen._GenericEJBHome_Generated_DynamicStub.create(com/sun/ejb/codegen/_GenericEJBHome_Generated_DynamicStub.java)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sun.ejb.EJBUtils.lookupRemote30BusinessObject(EJBUtils.java:372)
... 5 more
Caused by: org.omg.CORBA.NO_PERMISSION: ----------BEGIN server-side stack trace----------
org.omg.CORBA.NO_PERMISSION: vmcid: 0x0 minor code: 0 completed: No
at com.sun.enterprise.iiop.security.SecServerRequestInterceptor.handle_null_service_context(SecServerRequestInterceptor.java:407)
at com.sun.enterprise.iiop.security.SecServerRequestInterceptor.receive_request(SecServerRequestInterceptor.java:429)
at com.sun.corba.ee.impl.interceptors.InterceptorInvoker.invokeServerInterceptorIntermediatePoint(InterceptorInvoker.java:627)
at com.sun.corba.ee.impl.interceptors.PIHandlerImpl.invokeServerPIIntermediatePoint(PIHandlerImpl.java:530)
at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.getServantWithPI(CorbaServerRequestDispatcherImpl.java:406)
at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:224)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1846)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1706)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:1088)
at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:223)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:806)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.dispatch(CorbaMessageMediatorImpl.java:563)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.doWork(CorbaMessageMediatorImpl.java:2567)
at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:555)
----------END server-side stack trace---------- vmcid: 0x0 minor code: 0 completed: No
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at com.sun.corba.ee.impl.protocol.giopmsgheaders.MessageBase.getSystemException(MessageBase.java:913)
at com.sun.corba.ee.impl.protocol.giopmsgheaders.ReplyMessage_1_2.getSystemException(ReplyMessage_1_2.java:131)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.getSystemExceptionReply(CorbaMessageMediatorImpl.java:685)
at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.processResponse(CorbaClientRequestDispatcherImpl.java:472)
at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.marshalingComplete(CorbaClientRequestDispatcherImpl.java:363)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.invoke(CorbaClientDelegateImpl.java:219)
at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.privateInvoke(StubInvocationHandlerImpl.java:192)
... 13 moreAny help is appreciated.
Regards!
Nithi.
Edited by: EJB3 on Aug 17, 2008 8:17 PM
Maybe you are looking for
-
KSB1 report - restriction on line items displayed in output
In the standard report KSB1(Actual cost line items for Cost center) it displays selection cancelled after 5000 data records,is there way i could get all the records displayed for the period we select.Please advice.
-
Tax Reporting Date Active in Documents
Hello, I have activated the flag "Tax Reporting Date Active in Documents" and I want to select which data the system must take. I have found the option to select the Document Data instead of the Posting Data in OBCK transaction but I need to take the
-
Notes - how come there is no tab of access in iTunes?
How do I get a word document onto my iTouch? (have XP SP3)
-
Hi Guys, I have created a client long time back and updated it many times. Now suddenly i want to know when i have created the client..the date and time of the client creation. I have tried to check this in T000 even ...but it's showing the last edit
-
ORA-00322: log 1 of thread 1 is not current copy
can you please help me. Im using oracle express edition. Regrds upul Indika. SQL> startup ORACLE instance started. Total System Global Area 146800640 bytes Fixed Size 1286220 bytes Variable Size 83890100 bytes Database Buffers 58720256 bytes Redo Buf