初学ejb3.0 JBOSS部属的问题急急急急~~~~~~

shadowing_fly 2007-12-06 09:04:06
报 javax.naming.NameNotFoundException: TravelAgentBean not bound异常
应该是
jndi.properties的问题
请高手指教..

...全文
901 点赞 收藏 31
写回复
31 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
FairLu 2007-12-14
呵呵,好久没来看了。
我都不知道原因是什么?
把原因和处理的方法说一下吧。
回复
shadowing_fly 2007-12-13
已经自己解决了
多谢FairLu
回复
shadowing_fly 2007-12-13
已经自己解决了
多谢FairLu
回复
lyongliang3 2007-12-11
ding ~
回复
shadowing_fly 2007-12-09
谢谢我再试试
回复
shadowing_fly 2007-12-08
[java] javax.naming.NameNotFoundException: TravelAgentBean not bound
[java] at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)

[java] at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)

[java] at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
[java] at org.jnp.server.NamingServer.lookup(NamingServer.java:267)
[java] at sun.reflect.GeneratedMethodAccessor78.invoke(Unknown Source)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet
AccessorImpl.java:25)
[java] at java.lang.reflect.Method.invoke(Method.java:597)
[java] at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.jav
05)
[java] at sun.rmi.transport.Transport$1.run(Transport.java:159)
[java] at java.security.AccessController.doPrivileged(Native Method)
[java] at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
[java] at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTranspor
ava:535)
[java] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCP
nsport.java:790)
[java] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPT
sport.java:649)
[java] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Thread
lExecutor.java:885)
[java] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPool
cutor.java:907)
[java] at java.lang.Thread.run(Thread.java:619)
[java] at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServe
treamRemoteCall.java:255)
[java] at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCa
java:233)
[java] at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:142)
[java] at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
[java] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:62

[java] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:58

[java] at javax.naming.InitialContext.lookup(InitialContext.java:392)
[java] at com.titan.clients.Client.main(Client.java:20)

LD SUCCESSFUL
al time: 2 seconds
Documents and Settings\Hero\桌面\ex04_1>ant run.client
ldfile: build.xml

pare:

pile:
[javac] Compiling 1 source file to C:\Documents and Settings\Hero\桌面\ex04_
uild\classes

jar:

.client:
[java] javax.naming.NameNotFoundException: TravelAgentBean not bound
[java] at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)

[java] at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)

[java] at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
[java] at org.jnp.server.NamingServer.lookup(NamingServer.java:267)
[java] at sun.reflect.GeneratedMethodAccessor78.invoke(Unknown Source)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet
AccessorImpl.java:25)
[java] at java.lang.reflect.Method.invoke(Method.java:597)
[java] at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.jav
05)
[java] at sun.rmi.transport.Transport$1.run(Transport.java:159)
[java] at java.security.AccessController.doPrivileged(Native Method)
[java] at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
[java] at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTranspor
ava:535)
[java] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCP
nsport.java:790)
[java] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPT
sport.java:649)
[java] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Thread
lExecutor.java:885)
[java] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPool
cutor.java:907)
[java] at java.lang.Thread.run(Thread.java:619)
[java] at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServe
treamRemoteCall.java:255)
[java] at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCa
java:233)
[java] at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:142)
[java] at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
[java] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:62

[java] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:58

[java] at javax.naming.InitialContext.lookup(InitialContext.java:392)
[java] at com.titan.clients.Client.main(Client.java:20)
回复
shadowing_fly 2007-12-08
刚才是没开servr...现在开了老问题又来了..
回复
shadowing_fly 2007-12-08
好像是端口不对..
回复
shadowing_fly 2007-12-08
出现新错误...[java] javax.naming.CommunicationException: Could not obtain connection to
f these urls: localhost:1099 and discovery failed with error: javax.naming.
nicationException: Receive timed out [Root exception is java.net.SocketTime
ception: Receive timed out] [Root exception is javax.naming.CommunicationEx
on: Failed to connect to server localhost:1099 [Root exception is javax.nam
erviceUnavailableException: Failed to connect to server localhost:1099 [Roo
eption is java.net.ConnectException: Connection refused: connect]]]
[java] at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:

[java] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:59

[java] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:58

[java] at javax.naming.InitialContext.lookup(InitialContext.java:392)
[java] at com.titan.clients.Client.main(Client.java:20)
[java] Caused by: javax.naming.CommunicationException: Failed to connect to
er localhost:1099 [Root exception is javax.naming.ServiceUnavailableExcepti
ailed to connect to server localhost:1099 [Root exception is java.net.Conne
eption: Connection refused: connect]]
[java] at org.jnp.interfaces.NamingContext.getServer(NamingContext.java

[java] at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:

[java] ... 4 more
[java] Caused by: javax.naming.ServiceUnavailableException: Failed to conne
server localhost:1099 [Root exception is java.net.ConnectException: Connec
refused: connect]
[java] at org.jnp.interfaces.NamingContext.getServer(NamingContext.java

[java] ... 5 more
[java] Caused by: java.net.ConnectException: Connection refused: connect
[java] at java.net.PlainSocketImpl.socketConnect(Native Method)
[java] at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
[java] at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.jav
)
[java] at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
[java] at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
[java] at java.net.Socket.connect(Socket.java:519)
[java] at java.net.Socket.connect(Socket.java:469)
[java] at java.net.Socket.<init>(Socket.java:366)
[java] at java.net.Socket.<init>(Socket.java:266)
[java] at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocke
ory.java:84)
[java] at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocke
ory.java:77)
[java] at org.jnp.interfaces.NamingContext.getServer(NamingContext.java

[java] ... 5 more
回复
shadowing_fly 2007-12-08
谢谢
我试试
回复
FairLu 2007-12-08
<fileset dir="${jboss.home}/server/default/deploy/jboss-hibernate.deployer">
<include name="*.jar"/>
</fileset>
<fileset dir="${jboss.home}/server/default/deploy/jboss-aop.deployer">
<include name="*.jar"/>
</fileset>
你用的是什么样的jboss?我用了JEMS(jboss4.0.4GA + EJB3.0)跑那书上的例子没有问题的,后来下了一个jboss-hibernate.deployer来看看,发现里面没有关于ejb3.0的lib,编译都通不过,我一点也不懂hibernate,也不知道怎么样才对。你注意一下你的classpath,尝试自己去写一个单独的客户端去查找这个JNDI,从你给出的信息来看应该是TravelAgentRemote。使用JBOSS_HOME\client\jbossall-client.jar里面的类:

import java.util.Properties;
import javax.naming.Context;
import javax.naming.NamingException;
import javax.naming.InitialContext;

public class Client {
public static void main(String[] args) {
Properties props = new Properties();
props.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
props.put(Context.PROVIDER_URL, "jnp://localhost:1099");

try {
Context ctx = new InitialContext(props);
Object objRef = ctx.lookup("project/TravelAgentRemote");
} catch (NamingException ne) {
ne.printStackTrace();
}
}
}

P.S.
JEMS:http://labs.jboss.com/jemsinstaller/


回复
FairLu 2007-12-07
Global JNDI Namespace
+- TravelAgentRemote (proxy: $Proxy77 implements interface com.titan.travelagent.TravelAgentRemote,interface org.jboss.ejb3.JBossProxy,interface javax.ejb.EJBObject)

你的代码应该是对的,你的jndi.properties是什么?我用下面的代码和jndi.properties都可以正确找到jboss相应的ejb。看看对你有没有帮助。
Properties props = new Properties();
props.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
props.put(Context.PROVIDER_URL, "jnp://localhost:1099");

Context ctx = new InitialContext(props);

java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
java.naming.provider.url=localhost
回复
shadowing_fly 2007-12-07
to xml[code=XAML]jmx-console.war

UserTransaction
UserTransaction
javax.naming.LinkRef


ORB
org.jacorb.orb.ORB


env
org.jnp.interfaces.NamingContext

security
org.jnp.interfaces.NamingContext

realmMapping
java:/jaas/jmx-console
javax.naming.LinkRef


subject
java:/jaas/jmx-console/subject
javax.naming.LinkRef


securityMgr
java:/jaas/jmx-console
javax.naming.LinkRef


security-domain
java:/jaas/jmx-console
javax.naming.LinkRef





console-mgr.sar/web-console.war

UserTransaction
UserTransaction
javax.naming.LinkRef


ORB
org.jacorb.orb.ORB


env
org.jnp.interfaces.NamingContext

security
org.jnp.interfaces.NamingContext

realmMapping
java:/jaas/jmx-console
javax.naming.LinkRef


subject
java:/jaas/jmx-console/subject
javax.naming.LinkRef


securityMgr
java:/jaas/jmx-console
javax.naming.LinkRef


security-domain
java:/jaas/jmx-console
javax.naming.LinkRef





jbossweb-tomcat55.sar/ROOT.war

UserTransaction
UserTransaction
javax.naming.LinkRef


ORB
org.jacorb.orb.ORB


env
org.jnp.interfaces.NamingContext

security
org.jnp.interfaces.NamingContext

realmMapping
java:/jaas/other
javax.naming.LinkRef


subject
java:/jaas/other/subject
javax.naming.LinkRef


securityMgr
java:/jaas/other
javax.naming.LinkRef


security-domain
java:/jaas/other
javax.naming.LinkRef





jbossws.sar/jbossws-context.war

UserTransaction
UserTransaction
javax.naming.LinkRef


ORB
org.jacorb.orb.ORB


env
org.jnp.interfaces.NamingContext

security
org.jnp.interfaces.NamingContext

realmMapping
java:/jaas/other
javax.naming.LinkRef


subject
java:/jaas/other/subject
javax.naming.LinkRef


securityMgr
java:/jaas/other
javax.naming.LinkRef


security-domain
java:/jaas/other
javax.naming.LinkRef





http-invoker.sar/invoker.war

UserTransaction
UserTransaction
javax.naming.LinkRef


ORB
org.jacorb.orb.ORB


env
org.jnp.interfaces.NamingContext

security
org.jnp.interfaces.NamingContext

realmMapping
java:/jaas/jmx-console
javax.naming.LinkRef


subject
java:/jaas/jmx-console/subject
javax.naming.LinkRef


securityMgr
java:/jaas/jmx-console
javax.naming.LinkRef


security-domain
java:/jaas/jmx-console
javax.naming.LinkRef





jbossmq-httpil.sar/jbossmq-httpil.war

UserTransaction
UserTransaction
javax.naming.LinkRef


ORB
org.jacorb.orb.ORB


env
org.jnp.interfaces.NamingContext

security
org.jnp.interfaces.NamingContext

realmMapping
java:/jaas/jbossmq
javax.naming.LinkRef


subject
java:/jaas/jbossmq/subject
javax.naming.LinkRef


securityMgr
java:/jaas/jbossmq
javax.naming.LinkRef


security-domain
java:/jaas/jbossmq
javax.naming.LinkRef





java:

jaas
javax.naming.Context

HsqlDbRealm
org.jboss.security.plugins.SecurityDomainContext


jmx-console
org.jboss.security.plugins.SecurityDomainContext


jbossmq
org.jboss.security.plugins.SecurityDomainContext


JmsXARealm
org.jboss.security.plugins.SecurityDomainContext



TransactionPropagationContextImporter
org.jboss.tm.TransactionPropagationContextImporter


JmsXA
org.jboss.resource.adapter.jms.JmsConnectionFactoryImpl


comp.ejb3
javax.naming.Context


JBossCorbaNaming
org.omg.CosNaming.NamingContextExt


DefaultDS
javax.sql.DataSource


StdJMSPool
org.jboss.jms.asf.StdServerSessionPoolFactory


TransactionManager
org.jboss.tm.TxManager


JBossCorbaPOA
org.omg.PortableServer.POA


TransactionPropagationContextExporter
org.jboss.tm.TransactionPropagationContextFactory


ConnectionFactory
org.jboss.mq.SpyConnectionFactory


DefaultJMSProvider
org.jboss.jms.jndi.JNDIProviderAdapter


XAConnectionFactory
org.jboss.mq.SpyXAConnectionFactory


JBossCorbaInterfaceRepositoryPOA
org.omg.PortableServer.POA


Mail
javax.mail.Session


JBossCorbaORB
org.omg.CORBA.ORB


timedCacheFactory
javax.naming.Context

Failed to list contents of: timedCacheFactory, errmsg=org.jboss.util.TimedCachePolicy cannot be cast to javax.naming.NamingEnumeration



SecurityProxyFactory
org.jboss.security.SubjectSecurityProxyFactory


comp
javax.naming.Context



Global

TravelAgentRemote
$Proxy77


HASessionState
org.jnp.interfaces.NamingContext

Default
org.jboss.ha.hasessionstate.server.HASessionStateImpl



TopicConnectionFactory
org.jboss.naming.LinkRefPair


jmx
org.jnp.interfaces.NamingContext

invoker
org.jnp.interfaces.NamingContext

RMIAdaptor
$Proxy49



rmi
org.jnp.interfaces.NamingContext

RMIAdaptor
jmx/invoker/RMIAdaptor
javax.naming.LinkRef




HTTPXAConnectionFactory
org.jboss.mq.SpyXAConnectionFactory


ConnectionFactory
org.jboss.mq.SpyConnectionFactory


UserTransactionSessionFactory
$Proxy55


HTTPConnectionFactory
org.jboss.mq.SpyConnectionFactory


XAConnectionFactory
org.jboss.mq.SpyXAConnectionFactory


invokers
org.jnp.interfaces.NamingContext

cm-c09040e0070d
org.jnp.interfaces.NamingContext

iiop
org.jboss.invocation.iiop.IIOPInvoker




UserTransaction
org.jboss.tm.usertx.client.ClientUserTransaction


UILXAConnectionFactory
XAConnectionFactory
javax.naming.LinkRef


UIL2XAConnectionFactory
XAConnectionFactory
javax.naming.LinkRef


HAPartition
org.jnp.interfaces.NamingContext

DefaultPartition
org.jboss.ha.framework.server.HAPartitionImpl



queue
org.jnp.interfaces.NamingContext

A
org.jboss.mq.SpyQueue


testQueue
org.jboss.mq.SpyQueue


ex
org.jboss.mq.SpyQueue


DLQ
org.jboss.mq.SpyQueue


D
org.jboss.mq.SpyQueue


C
org.jboss.mq.SpyQueue


B
org.jboss.mq.SpyQueue



topic
org.jnp.interfaces.NamingContext

testDurableTopic
org.jboss.mq.SpyTopic


testTopic
org.jboss.mq.SpyTopic


securedTopic
org.jboss.mq.SpyTopic



console
org.jnp.interfaces.NamingContext

PluginManager
$Proxy51



UIL2ConnectionFactory
ConnectionFactory
javax.naming.LinkRef


HiLoKeyGeneratorFactory
org.jboss.ejb.plugins.keygenerator.hilo.HiLoKeyGeneratorFactory


UILConnectionFactory
ConnectionFactory
javax.naming.LinkRef


QueueConnectionFactory
org.jboss.naming.LinkRefPair


UUIDKeyGeneratorFactory
org.jboss.ejb.plugins.keygenerator.uuid.UUIDKeyGeneratorFactory





[/code]
回复
shadowing_fly 2007-12-07
Global JNDI Namespace
+- TravelAgentRemote (proxy: $Proxy77 implements interface com.titan.travelagent.TravelAgentRemote,interface org.jboss.ejb3.JBossProxy,interface javax.ejb.EJBObject)
+- HASessionState (class: org.jnp.interfaces.NamingContext)
| +- Default (class: org.jboss.ha.hasessionstate.server.HASessionStateImpl)
+- TopicConnectionFactory (class: org.jboss.naming.LinkRefPair)
+- jmx (class: org.jnp.interfaces.NamingContext)
| +- invoker (class: org.jnp.interfaces.NamingContext)
| | +- RMIAdaptor (proxy: $Proxy49 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)
+- HTTPXAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory)
+- ConnectionFactory (class: org.jboss.mq.SpyConnectionFactory)
+- UserTransactionSessionFactory (proxy: $Proxy55 implements interface org.jboss.tm.usertx.interfaces.UserTransactionSessionFactory)
+- HTTPConnectionFactory (class: org.jboss.mq.SpyConnectionFactory)
+- XAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory)
+- invokers (class: org.jnp.interfaces.NamingContext)
| +- cm-c09040e0070d (class: org.jnp.interfaces.NamingContext)
| | +- iiop (class: org.jboss.invocation.iiop.IIOPInvoker)
+- UserTransaction (class: org.jboss.tm.usertx.client.ClientUserTransaction)
+- UILXAConnectionFactory[link -> XAConnectionFactory] (class: javax.naming.LinkRef)
+- UIL2XAConnectionFactory[link -> XAConnectionFactory] (class: javax.naming.LinkRef)
+- HAPartition (class: org.jnp.interfaces.NamingContext)
| +- DefaultPartition (class: org.jboss.ha.framework.server.HAPartitionImpl)
+- 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: $Proxy51 implements No ClassLoaders found for: org.jboss.console.manager.PluginManagerMBean (no security manager: RMI class loader disabled))
+- 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)

回复
shadowing_fly 2007-12-07
结果是这样..[code=Java]
结果是这样
web Applications
java:comp namespace of the jmx-console.war application:
+- UserTransaction[link -> UserTransaction] (class: javax.naming.LinkRef)
+- ORB (class: org.jacorb.orb.ORB)
+- env (class: org.jnp.interfaces.NamingContext)
| +- security (class: org.jnp.interfaces.NamingContext)
| | +- realmMapping[link -> java:/jaas/jmx-console] (class: javax.naming.LinkRef)
| | +- subject[link -> java:/jaas/jmx-console/subject] (class: javax.naming.LinkRef)
| | +- securityMgr[link -> java:/jaas/jmx-console] (class: javax.naming.LinkRef)
| | +- security-domain[link -> java:/jaas/jmx-console] (class: javax.naming.LinkRef)

java:comp namespace of the console-mgr.sar/web-console.war application:
+- UserTransaction[link -> UserTransaction] (class: javax.naming.LinkRef)
+- ORB (class: org.jacorb.orb.ORB)
+- env (class: org.jnp.interfaces.NamingContext)
| +- security (class: org.jnp.interfaces.NamingContext)
| | +- realmMapping[link -> java:/jaas/jmx-console] (class: javax.naming.LinkRef)
| | +- subject[link -> java:/jaas/jmx-console/subject] (class: javax.naming.LinkRef)
| | +- securityMgr[link -> java:/jaas/jmx-console] (class: javax.naming.LinkRef)
| | +- security-domain[link -> java:/jaas/jmx-console] (class: javax.naming.LinkRef)

java:comp namespace of the jbossweb-tomcat55.sar/ROOT.war application:
+- UserTransaction[link -> UserTransaction] (class: javax.naming.LinkRef)
+- ORB (class: org.jacorb.orb.ORB)
+- env (class: org.jnp.interfaces.NamingContext)
| +- security (class: org.jnp.interfaces.NamingContext)
| | +- realmMapping[link -> java:/jaas/other] (class: javax.naming.LinkRef)
| | +- subject[link -> java:/jaas/other/subject] (class: javax.naming.LinkRef)
| | +- securityMgr[link -> java:/jaas/other] (class: javax.naming.LinkRef)
| | +- security-domain[link -> java:/jaas/other] (class: javax.naming.LinkRef)

java:comp namespace of the jbossws.sar/jbossws-context.war application:
+- UserTransaction[link -> UserTransaction] (class: javax.naming.LinkRef)
+- ORB (class: org.jacorb.orb.ORB)
+- env (class: org.jnp.interfaces.NamingContext)
| +- security (class: org.jnp.interfaces.NamingContext)
| | +- realmMapping[link -> java:/jaas/other] (class: javax.naming.LinkRef)
| | +- subject[link -> java:/jaas/other/subject] (class: javax.naming.LinkRef)
| | +- securityMgr[link -> java:/jaas/other] (class: javax.naming.LinkRef)
| | +- security-domain[link -> java:/jaas/other] (class: javax.naming.LinkRef)

java:comp namespace of the http-invoker.sar/invoker.war application:
+- UserTransaction[link -> UserTransaction] (class: javax.naming.LinkRef)
+- ORB (class: org.jacorb.orb.ORB)
+- env (class: org.jnp.interfaces.NamingContext)
| +- security (class: org.jnp.interfaces.NamingContext)
| | +- realmMapping[link -> java:/jaas/jmx-console] (class: javax.naming.LinkRef)
| | +- subject[link -> java:/jaas/jmx-console/subject] (class: javax.naming.LinkRef)
| | +- securityMgr[link -> java:/jaas/jmx-console] (class: javax.naming.LinkRef)
| | +- security-domain[link -> java:/jaas/jmx-console] (class: javax.naming.LinkRef)

java:comp namespace of the jbossmq-httpil.sar/jbossmq-httpil.war application:
+- UserTransaction[link -> UserTransaction] (class: javax.naming.LinkRef)
+- ORB (class: org.jacorb.orb.ORB)
+- env (class: org.jnp.interfaces.NamingContext)
| +- security (class: org.jnp.interfaces.NamingContext)
| | +- realmMapping[link -> java:/jaas/jbossmq] (class: javax.naming.LinkRef)
| | +- subject[link -> java:/jaas/jbossmq/subject] (class: javax.naming.LinkRef)
| | +- securityMgr[link -> java:/jaas/jbossmq] (class: javax.naming.LinkRef)
| | +- security-domain[link -> java:/jaas/jbossmq] (class: javax.naming.LinkRef)

java: Namespace
+- jaas (class: javax.naming.Context)
| +- HsqlDbRealm (class: org.jboss.security.plugins.SecurityDomainContext)
| +- jmx-console (class: org.jboss.security.plugins.SecurityDomainContext)
| +- jbossmq (class: org.jboss.security.plugins.SecurityDomainContext)
| +- JmsXARealm (class: org.jboss.security.plugins.SecurityDomainContext)
+- TransactionPropagationContextImporter (class: org.jboss.tm.TransactionPropagationContextImporter)
+- JmsXA (class: org.jboss.resource.adapter.jms.JmsConnectionFactoryImpl)
+- comp.ejb3 (class: javax.naming.Context)
| NonContext: null
+- JBossCorbaNaming (class: org.omg.CosNaming.NamingContextExt)
+- DefaultDS (class: javax.sql.DataSource)
+- StdJMSPool (class: org.jboss.jms.asf.StdServerSessionPoolFactory)
+- TransactionManager (class: org.jboss.tm.TxManager)
+- JBossCorbaPOA (class: org.omg.PortableServer.POA)
+- TransactionPropagationContextExporter (class: org.jboss.tm.TransactionPropagationContextFactory)
+- ConnectionFactory (class: org.jboss.mq.SpyConnectionFactory)
+- DefaultJMSProvider (class: org.jboss.jms.jndi.JNDIProviderAdapter)
+- XAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory)
+- JBossCorbaInterfaceRepositoryPOA (class: org.omg.PortableServer.POA)
+- Mail (class: javax.mail.Session)
+- JBossCorbaORB (class: org.omg.CORBA.ORB)
+- timedCacheFactory (class: javax.naming.Context)
Failed to lookup: timedCacheFactory, errmsg=org.jboss.util.TimedCachePolicy cannot be cast to javax.naming.NamingEnumeration
+- SecurityProxyFactory (class: org.jboss.security.SubjectSecurityProxyFactory)
+- comp (class: javax.naming.Context)

回复
shadowing_fly 2007-12-07
结果是这样..[code=Java]
结果是这样
web Applications
java:comp namespace of the jmx-console.war application:
+- UserTransaction[link -> UserTransaction] (class: javax.naming.LinkRef)
+- ORB (class: org.jacorb.orb.ORB)
+- env (class: org.jnp.interfaces.NamingContext)
| +- security (class: org.jnp.interfaces.NamingContext)
| | +- realmMapping[link -> java:/jaas/jmx-console] (class: javax.naming.LinkRef)
| | +- subject[link -> java:/jaas/jmx-console/subject] (class: javax.naming.LinkRef)
| | +- securityMgr[link -> java:/jaas/jmx-console] (class: javax.naming.LinkRef)
| | +- security-domain[link -> java:/jaas/jmx-console] (class: javax.naming.LinkRef)

java:comp namespace of the console-mgr.sar/web-console.war application:
+- UserTransaction[link -> UserTransaction] (class: javax.naming.LinkRef)
+- ORB (class: org.jacorb.orb.ORB)
+- env (class: org.jnp.interfaces.NamingContext)
| +- security (class: org.jnp.interfaces.NamingContext)
| | +- realmMapping[link -> java:/jaas/jmx-console] (class: javax.naming.LinkRef)
| | +- subject[link -> java:/jaas/jmx-console/subject] (class: javax.naming.LinkRef)
| | +- securityMgr[link -> java:/jaas/jmx-console] (class: javax.naming.LinkRef)
| | +- security-domain[link -> java:/jaas/jmx-console] (class: javax.naming.LinkRef)

java:comp namespace of the jbossweb-tomcat55.sar/ROOT.war application:
+- UserTransaction[link -> UserTransaction] (class: javax.naming.LinkRef)
+- ORB (class: org.jacorb.orb.ORB)
+- env (class: org.jnp.interfaces.NamingContext)
| +- security (class: org.jnp.interfaces.NamingContext)
| | +- realmMapping[link -> java:/jaas/other] (class: javax.naming.LinkRef)
| | +- subject[link -> java:/jaas/other/subject] (class: javax.naming.LinkRef)
| | +- securityMgr[link -> java:/jaas/other] (class: javax.naming.LinkRef)
| | +- security-domain[link -> java:/jaas/other] (class: javax.naming.LinkRef)

java:comp namespace of the jbossws.sar/jbossws-context.war application:
+- UserTransaction[link -> UserTransaction] (class: javax.naming.LinkRef)
+- ORB (class: org.jacorb.orb.ORB)
+- env (class: org.jnp.interfaces.NamingContext)
| +- security (class: org.jnp.interfaces.NamingContext)
| | +- realmMapping[link -> java:/jaas/other] (class: javax.naming.LinkRef)
| | +- subject[link -> java:/jaas/other/subject] (class: javax.naming.LinkRef)
| | +- securityMgr[link -> java:/jaas/other] (class: javax.naming.LinkRef)
| | +- security-domain[link -> java:/jaas/other] (class: javax.naming.LinkRef)

java:comp namespace of the http-invoker.sar/invoker.war application:
+- UserTransaction[link -> UserTransaction] (class: javax.naming.LinkRef)
+- ORB (class: org.jacorb.orb.ORB)
+- env (class: org.jnp.interfaces.NamingContext)
| +- security (class: org.jnp.interfaces.NamingContext)
| | +- realmMapping[link -> java:/jaas/jmx-console] (class: javax.naming.LinkRef)
| | +- subject[link -> java:/jaas/jmx-console/subject] (class: javax.naming.LinkRef)
| | +- securityMgr[link -> java:/jaas/jmx-console] (class: javax.naming.LinkRef)
| | +- security-domain[link -> java:/jaas/jmx-console] (class: javax.naming.LinkRef)

java:comp namespace of the jbossmq-httpil.sar/jbossmq-httpil.war application:
+- UserTransaction[link -> UserTransaction] (class: javax.naming.LinkRef)
+- ORB (class: org.jacorb.orb.ORB)
+- env (class: org.jnp.interfaces.NamingContext)
| +- security (class: org.jnp.interfaces.NamingContext)
| | +- realmMapping[link -> java:/jaas/jbossmq] (class: javax.naming.LinkRef)
| | +- subject[link -> java:/jaas/jbossmq/subject] (class: javax.naming.LinkRef)
| | +- securityMgr[link -> java:/jaas/jbossmq] (class: javax.naming.LinkRef)
| | +- security-domain[link -> java:/jaas/jbossmq] (class: javax.naming.LinkRef)

java: Namespace
+- jaas (class: javax.naming.Context)
| +- HsqlDbRealm (class: org.jboss.security.plugins.SecurityDomainContext)
| +- jmx-console (class: org.jboss.security.plugins.SecurityDomainContext)
| +- jbossmq (class: org.jboss.security.plugins.SecurityDomainContext)
| +- JmsXARealm (class: org.jboss.security.plugins.SecurityDomainContext)
+- TransactionPropagationContextImporter (class: org.jboss.tm.TransactionPropagationContextImporter)
+- JmsXA (class: org.jboss.resource.adapter.jms.JmsConnectionFactoryImpl)
+- comp.ejb3 (class: javax.naming.Context)
| NonContext: null
+- JBossCorbaNaming (class: org.omg.CosNaming.NamingContextExt)
+- DefaultDS (class: javax.sql.DataSource)
+- StdJMSPool (class: org.jboss.jms.asf.StdServerSessionPoolFactory)
+- TransactionManager (class: org.jboss.tm.TxManager)
+- JBossCorbaPOA (class: org.omg.PortableServer.POA)
+- TransactionPropagationContextExporter (class: org.jboss.tm.TransactionPropagationContextFactory)
+- ConnectionFactory (class: org.jboss.mq.SpyConnectionFactory)
+- DefaultJMSProvider (class: org.jboss.jms.jndi.JNDIProviderAdapter)
+- XAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory)
+- JBossCorbaInterfaceRepositoryPOA (class: org.omg.PortableServer.POA)
+- Mail (class: javax.mail.Session)
+- JBossCorbaORB (class: org.omg.CORBA.ORB)
+- timedCacheFactory (class: javax.naming.Context)
Failed to lookup: timedCacheFactory, errmsg=org.jboss.util.TimedCachePolicy cannot be cast to javax.naming.NamingEnumeration
+- SecurityProxyFactory (class: org.jboss.security.SubjectSecurityProxyFactory)
+- comp (class: javax.naming.Context)

回复
FairLu 2007-12-07
那你先去看一看这个ejb的jndi是什么

http://localhost:8080/jmx-console/ -> service=JNDIView -> 然后调用java.lang.String list()
回复
shadowing_fly 2007-12-07
换了..不行
回复
FairLu 2007-12-07
EJB3中可以不用写会话Bean的配置文件,所以默认的JNDI名为"EJBName/remote" 你的应该是TravelAgentBean/remote吧,根据Java文件来看,你应该没有配ejb-jar.xml和jboss.xml吧。你改一改试试看。
回复
shadowing_fly 2007-12-07
谁帮我解决了我分全部送掉...
回复
加载更多回复
相关推荐
发帖
JBoss技术交流
创建于2007-07-26

6783

社区成员

JBoss技术交流
申请成为版主
帖子事件
创建了帖子
2007-12-06 09:04
社区公告
暂无公告