[EJB 3.0 Users] - Re: NotBound ERRoR
by amira88
"Wolfgang Knauf" wrote : Hi,
|
| in my "Properties" snippet, there is one thing you have to replace with your own config: the "j2ee.clientName" should be declared in your "jboss-client.xml" file.
| But you don't need this line if you don't want to use the ENC for lookup.
|
| What do you mean with "sun server lib"? Is your client actually a ejb app in a sun app server?
|
| It seems that you are missing big conceptual parts of EJB3. So I would advice you (as Jaikiran already did) to take the time and read a good book or at least some EJB tutorials ;-).
|
| Best regards
|
| Wolfgang
Hi Sir,
Thank u for ur reply!!
My client is an ejb application:and this it:
| package ClientBeans;
|
|
|
| import java.util.Iterator;
| import java.util.List;
| import java.util.Properties;
|
| import javax.naming.Context;
| import javax.naming.InitialContext;
| import javax.naming.NamingException;
| import javax.persistence.EntityManager;
| import javax.persistence.PersistenceContext;
|
| import de.laliluna.library.Hotel;
| import de.laliluna.library.HotelTestBean;
| import de.laliluna.library.HotelTestBeanRemote;
|
|
| public class ClientA {
|
| /**
| * @param args
| */
|
|
|
|
| public static void main(String[] args) {
|
| // Context context;
|
|
|
|
| try
| {
|
| Properties props = new Properties();
| props.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
| props.setProperty(Context.URL_PKG_PREFIXES, "org.jboss.naming.client");
| props.setProperty(Context.PROVIDER_URL, "jnp://localhost:1099");
| // props.setProperty("j2ee.clientName", "ClientNameFromJBossClientXML");
|
| InitialContext initialContext = new InitialContext(props);
|
|
|
|
|
|
| //context = new InitialContext();
|
| HotelTestBeanRemote beanRemote = (HotelTestBeanRemote) initialContext.lookup("HotelTestBean/local");
|
| beanRemote.test();
|
|
|
| } catch (NamingException e)
| {
| e.printStackTrace();
|
| throw new RuntimeException(e);
| }
|
|
|
|
| }
|
| }
| I have an error when i start my jboos server , sop that's why the client can't be executed and this it:
|
| 04:38:38,232 ERROR [AbstractKernelController] Error installing to Start: name=persistence.unit:unitName=#sample state=Create
| javax.persistence.PersistenceException: [PersistenceUnit: sample] Unable to build EntityManagerFactory
| at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:677)
| at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:132)
| at org.jboss.jpa.deployment.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:301)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
| at java.lang.reflect.Method.invoke(Unknown Source)
| at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:59)
| at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:150)
| at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)
| at org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrapper.execute(KernelControllerContextAction.java:241)
| at org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:47)
| at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrapper(KernelControllerContextAction.java:109)
| at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:70)
| at org.jboss.kernel.plugins.dependency.LifecycleAction.installActionInternal(LifecycleAction.java:221)
| at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54)
| at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42)
| at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
| at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
| at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
| at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
| at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
| at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
| at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:774)
| at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:540)
| at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:121)
| at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:51)
| at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
| at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
| at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
| at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
| at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
| at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
| at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:698)
| at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:304)
| at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:205)
| at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:405)
| at org.jboss.Main.boot(Main.java:209)
| at org.jboss.Main$1.run(Main.java:547)
| at java.lang.Thread.run(Unknown Source)
| Caused by: org.hibernate.HibernateException: cannot simultaneously fetch multiple bags
| at org.hibernate.loader.BasicLoader.postInstantiate(BasicLoader.java:89)
| at org.hibernate.loader.entity.EntityLoader.<init>(EntityLoader.java:98)
| at org.hibernate.loader.entity.EntityLoader.<init>(EntityLoader.java:66)
| at org.hibernate.loader.entity.EntityLoader.<init>(EntityLoader.java:56)
| at org.hibernate.loader.entity.BatchingEntityLoader.createBatchingEntityLoader(BatchingEntityLoader.java:126)
| at org.hibernate.persister.entity.AbstractEntityPersister.createEntityLoader(AbstractEntityPersister.java:1775)
| at org.hibernate.persister.entity.AbstractEntityPersister.createEntityLoader(AbstractEntityPersister.java:1779)
| at org.hibernate.persister.entity.AbstractEntityPersister.createLoaders(AbstractEntityPersister.java:3012)
| at org.hibernate.persister.entity.AbstractEntityPersister.postInstantiate(AbstractEntityPersister.java:3005)
| at org.hibernate.persister.entity.SingleTableEntityPersister.postInstantiate(SingleTableEntityPersister.java:712)
| at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:322)
| at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1327)
| at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:867)
| at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:669)
| ... 50 more
| 04:38:38,271 WARN [WebServiceDeployerEJB] Ingore ejb deployment with null classname: org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData@8fd19516{HotelTestBean}
| 04:38:38,333 ERROR [ProfileServiceBootstrap] Failed to load profile: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
|
| DEPLOYMENTS MISSING DEPENDENCIES:
| Deployment "jboss.j2ee:jar=BaseHotele.jar,name=HotelTestBean,service=EJB3" is missing the following dependencies:
| Dependency "<UNKNOWN jboss.j2ee:jar=BaseHotele.jar,name=HotelTestBean,service=EJB3>" (should be in state "Described", but is actually in state "** UNRESOLVED Demands 'persistence.unit:unitName=#sample' **")
|
| DEPLOYMENTS IN ERROR:
| Deployment "<UNKNOWN jboss.j2ee:jar=BaseHotele.jar,name=HotelTestBean,service=EJB3>" is in error due to the following reason(s): ** UNRESOLVED Demands 'persistence.unit:unitName=#sample' **
| Deployment "persistence.unit:unitName=#sample" is in error due to the following reason(s): org.hibernate.HibernateException: cannot simultaneously fetch multiple bags
|
| 04:38:38,353 INFO [Http11Protocol] D�marrage de Coyote HTTP/1.1 sur http-127.0.0.1-8080
|
|
And i can't identify the cause i think it's my persistence.xml who cause the problem:
My persistence.xml
|
| <persistence xmlns="http://java.sun.com/xml/ns/persistence"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
| version="1.0">
| <persistence-unit name="sample">
| <jta-data-source>java:/DefaultDS</jta-data-source>
| <properties>
|
| <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
| </properties>
| </persistence-unit>
| </persistence>
I'm reading a lot of tutorial as you said it to me you and Mr jaikiran.
If you can help me please Give me a help i really need it.
Thank you so much Sir
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4269095#4269095
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4269095
14 years, 10 months
[jBPM Users] - Support needed to install and use jBPM
by -Silver-
Hi!
I opened another topic because I really really need support.
I'm trying to install jbpm4.2 and use it but I'm unable.
I'm in very hurry, please anyone could help me?
I tried to follow many tutorials to install it under jboss but nothing, I tried to learn how to use activity as described in PVM documentation but nothing, I don't know if my computer have some problem, if the documentation that I follow is referred to an old version or if is there some bug that prevent me to use jBPM.
I can delete all version of jpbm jboss javajdk eclipse etc from my pc to restart with a "clean" installation, could you guide me step by step on how I can install and use jbpm?
I would like to use the latest version of the programs, but if you are expert of an old version is ok, i'll download the versions of the programs that you suggest me.
Please help me, they are two weeks that I try to use it!!!
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4269062#4269062
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4269062
14 years, 10 months