[Persistence, JBoss/CMP, Hibernate, Database] - Re: hibernate.properties not found
by henry_h
thanks,
I went over to JBoss 5.0 Beta and I have no this error!
Know i have another problem. I see in the JMX console that my EJBs are deployed and are activated , nevertheless I become this error when i am trying to run the client:
javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an
application resource file: java.naming.factory.initial
at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.getURLOrDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.lookup(Unknown Source)
at client.kap09.BankClient.main(BankClient.java:17)
my client code snippet for the JNDI and naming look like follows :
Context ctx = new InitialContext();
Object ref = ctx.lookup("BankBean/remote");
BankRemote bvr = (BankRemote) PortableRemoteObject
.narrow(ref, BankVerwaltungRemote.class);
BufferedReader din = new BufferedReader(new InputStreamReader(
System.in));
????
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4154031#4154031
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4154031
17 years, 11 months
[EJB 3.0] - Re: muliple invokers in jboss.xml (JBOSS 4.0.5)...a nd Jboss
by hoedic
Hi,
I've tried to reproduce this issue with a JBoss 4.2.2 native configuration and still have the problem.
I have just noticed that only the first part of the JNDI name is bound for the first invoker (ejb3_u) with the complete second JNDI invoker. With Jboss 4.0.5, only the complete second JNDI invoker was bound.
| +- TopicConnectionFactory (class: org.jboss.naming.LinkRefPair)
| +- jmx (class: org.jnp.interfaces.NamingContext)
| | +- invoker (class: org.jnp.interfaces.NamingContext)
| | | +- RMIAdaptor (proxy: $Proxy47 implements interface org.jboss.jmx.adaptor.rmi.RMIAdaptor,interface org.jboss.jmx.adaptor.rmi.RMIAdaptorExt)
| | +- rmi (class: org.jnp.interfaces.NamingContext)
| | | +- RMIAdaptor[link -> jmx/invoker/RMIAdaptor] (class: javax.naming.LinkRef)
| +- JAXR (class: org.apache.ws.scout.registry.ConnectionFactoryImpl)
| +- HTTPXAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory)
| +- ConnectionFactory (class: org.jboss.mq.SpyConnectionFactory)
| +- ejb3_u (class: org.jnp.interfaces.NamingContext)
| +- UserTransactionSessionFactory (proxy: $Proxy14 implements interface org.jboss.tm.usertx.interfaces.UserTransactionSessionFactory)
| +- HTTPConnectionFactory (class: org.jboss.mq.SpyConnectionFactory)
| +- XAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory)
| +- TransactionSynchronizationRegistry (class: com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionSynchronizationRegistryImple)
| +- UserTransaction (class: org.jboss.tm.usertx.client.ClientUserTransaction)
| +- UILXAConnectionFactory[link -> XAConnectionFactory] (class: javax.naming.LinkRef)
| +- UIL2XAConnectionFactory[link -> XAConnectionFactory] (class: javax.naming.LinkRef)
| +- queue (class: org.jnp.interfaces.NamingContext)
| | +- A (class: org.jboss.mq.SpyQueue)
| | +- testQueue (class: org.jboss.mq.SpyQueue)
| | +- ex (class: org.jboss.mq.SpyQueue)
| | +- DLQ (class: org.jboss.mq.SpyQueue)
| | +- D (class: org.jboss.mq.SpyQueue)
| | +- C (class: org.jboss.mq.SpyQueue)
| | +- B (class: org.jboss.mq.SpyQueue)
| +- topic (class: org.jnp.interfaces.NamingContext)
| | +- testDurableTopic (class: org.jboss.mq.SpyTopic)
| | +- testTopic (class: org.jboss.mq.SpyTopic)
| | +- securedTopic (class: org.jboss.mq.SpyTopic)
| +- console (class: org.jnp.interfaces.NamingContext)
| | +- PluginManager (proxy: $Proxy48 implements interface org.jboss.console.manager.PluginManagerMBean)
| +- ejb3_c (class: org.jnp.interfaces.NamingContext)
| | +- FTimeService (proxy: $Proxy102 implements interface fr.vif.test.ejb3.ejb.test.TimeService3,interface org.jboss.ejb3.JBossProxy)
| +- UIL2ConnectionFactory[link -> ConnectionFactory] (class: javax.naming.LinkRef)
| +- HiLoKeyGeneratorFactory (class: org.jboss.ejb.plugins.keygenerator.hilo.HiLoKeyGeneratorFactory)
| +- UILConnectionFactory[link -> ConnectionFactory] (class: javax.naming.LinkRef)
| +- QueueConnectionFactory (class: org.jboss.naming.LinkRefPair)
| +- UUIDKeyGeneratorFactory (class: org.jboss.ejb.plugins.keygenerator.uuid.UUIDKeyGeneratorFactory)
| +- ATestEJB3 (class: org.jnp.interfaces.NamingContext)
| | +- FTimeService (class: org.jnp.interfaces.NamingContext)
| | | +- local (proxy: $Proxy102 implements interface fr.vif.test.ejb3.ejb.test.TimeService3,interface org.jboss.ejb3.JBossProxy)
|
Any help would be appreciate.
Thank's in advance.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4154024#4154024
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4154024
17 years, 11 months
[EJB/JBoss] - org.jboss.deployment.DeploymentException: Error in jbosscmp-
by thomas2008ch
I created an Entity with XDoclet binding with JBoss in Eclipse. The file "jbosscmp-jdbc.xml" is automatically created and looks as follow:
| <?xml version="1.0" encoding="UTF-8"?>
| <!DOCTYPE jbosscmp-jdbc PUBLIC "-//JBoss//DTD JBOSSCMP-JDBC 4.0//EN" "http://www.jboss.org/j2ee/dtd/jbosscmp-jdbc_4_0.dtd">
|
| <jbosscmp-jdbc>
| <defaults>
| <datasource>java:/OracleDS</datasource>
| <datasource-mapping>Oracle10g</datasource-mapping>
| <create-table>false</create-table>
| <alter-table>false</alter-table>
| <remove-table>false</remove-table>
| <preferred-relation-mapping>foreign-key</preferred-relation-mapping>
| </defaults>
|
| <enterprise-beans>
|
| <!--
| To add beans that you have deployment descriptor info for, add
| a file to your XDoclet merge directory called jbosscmp-jdbc-beans.xml
| that contains the <entity></entity> markup for those beans.
| -->
|
| <entity>
| <ejb-name>Book</ejb-name>
| <datasource>java:/OracleDS</datasource>
| <datasource-mapping>Oracle10g</datasource-mapping>
| <create-table>false</create-table>
| <remove-table>false</remove-table>
| <table-name>TEST.BOOK</table-name>
|
| <cmp-field>
| <field-name>id</field-name>
| <read-only>false</read-only>
| <column-name>ID</column-name>
|
| <jdbc-type>VARCHAR</jdbc-type>
| <sql-type>VARCHAR2</sql-type>
|
| </cmp-field>
| <cmp-field>
| <field-name>name</field-name>
| <read-only>false</read-only>
| <column-name>NAME</column-name>
|
| <jdbc-type>VARCHAR</jdbc-type>
| <sql-type>VARCHAR2</sql-type>
|
| </cmp-field>
| <cmp-field>
| <field-name>author</field-name>
| <read-only>false</read-only>
| <column-name>AUTHOR</column-name>
|
| <jdbc-type>VARCHAR</jdbc-type>
| <sql-type>VARCHAR2</sql-type>
|
| </cmp-field>
| <cmp-field>
| <field-name>public_date</field-name>
| <read-only>false</read-only>
| <column-name>PUBLIC_DATE</column-name>
|
| <jdbc-type>DATE</jdbc-type>
| <sql-type>DATE</sql-type>
|
| </cmp-field>
| <cmp-field>
| <field-name>description</field-name>
| <read-only>false</read-only>
| <column-name>DESCRIPTION</column-name>
|
| <jdbc-type>VARCHAR</jdbc-type>
| <sql-type>VARCHAR2</sql-type>
|
| </cmp-field>
|
| <!-- jboss 3.2 features -->
| <!-- optimistic locking does not express the exclusions needed -->
| </entity>
|
| </enterprise-beans>
|
| </jbosscmp-jdbc>
|
The "oracle-ds.xml" is under /server/default/deploy as looks as follow:
| <?xml version="1.0" encoding="UTF-8"?>
| <datasources>
| <local-tx-datasource>
| <jndi-name>OracleDS</jndi-name>
| <connection-url>jdbc:oracle:thin:@localhost:1521:XE</connection-url>
| <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
| <user-name>test</user-name>
| <password>test</password>
| <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
| <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml -->
| <metadata>
| <type-mapping>Oracle10g</type-mapping>
| </metadata>
| </local-tx-datasource>
| </datasources>
|
But as I deploy the EAR to JBoss, I got exception as follow:
| 2008-05-28 12:31:13,312 WARN [org.jboss.system.ServiceController] Problem starting service jboss.j2ee:service=EjbModule,module=TestJBossXDocletEJB2.jar
| org.jboss.deployment.DeploymentException: Error in jbosscmp-jdbc.xml : datasource-mapping Oracle10g not found
| at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCEntityMetaData.<init>(JDBCEntityMetaData.java:516)
| at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCApplicationMetaData.<init>(JDBCApplicationMetaData.java:327)
| at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCXmlFileLoader.load(JDBCXmlFileLoader.java:89)
| at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadJDBCEntityMetaData(JDBCStoreManager.java:736)
| at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.initStoreManager(JDBCStoreManager.java:424)
| at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start(JDBCStoreManager.java:368)
| at org.jboss.ejb.plugins.CMPPersistenceManager.start(CMPPersistenceManager.java:172)
| at org.jboss.ejb.EjbModule.startService(EjbModule.java:414)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
| 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 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)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| 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.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy31.start(Unknown Source)
| at org.jboss.ejb.EJBDeployer.start(EJBDeployer.java:662)
| 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 org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
| at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
| at org.jboss.wsf.container.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:87)
| at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
| at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy32.start(Unknown Source)
| at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
| at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1015)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
| at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy9.deploy(Unknown Source)
| at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
| at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
|
Does someone have such experience?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4154019#4154019
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4154019
17 years, 11 months
Seam EntityBeans get data
by Μέμμου Αρίστη
can i use EntityManager in an Entity Bean to get data from a datatable in a
getter method?
17 years, 11 months