Access remote bean with JNDI from remote system
by Karsten Ohme
Hi,
I want to access a Bean remotely (with JNDI). So I thought I could
access in on the client with:
Properties env = new Properties();
env.put(Context.PROVIDER_URL, "jnp://myserver:1099");
Context jndiContext = new InitialContext(env);
jndiContext.lookup(...);
If I do a port scan on "myserver" the JNDI port 1099 does not show up. I
thought this is the default port. What do I have to do the get access
the remote bean?
Is there somewhere a documentation how to access JNDI resources from
another system?
Regards,
Karsten
16 years, 8 months
[Beginners Corner] - Re: Problem starting service persistence.units (ClassCastEx
by mjhammel
Thanks for the reply. I removed all jar files from the ear file. Only the EJB class files are in the EAR now (other than XML config files). I also ran the jmx-console suggestion, plugging in org.hibernate.type.StringType as the class to search for. Only one occurance was found, in the server/default/lib/hibernate3.jar file. Unfortunately, I'm still getting the same error.
FWIW, here are the contents of the EAR file:
mjhammel(tty10)$ jar tvf Crunch.ear
| 0 Mon Dec 31 15:53:24 MST 2007 META-INF/
| 106 Mon Dec 31 15:53:22 MST 2007 META-INF/MANIFEST.MF
| 100 Mon Dec 31 15:53:24 MST 2007 META-INF/jboss-app.xml
| 4800 Mon Dec 31 15:53:24 MST 2007 crunch-web.war
| 171960 Mon Dec 31 15:53:18 MST 2007 crunch-ejb.jar
| 350 Mon Dec 31 15:53:18 MST 2007 crunch-common.jar
| 555 Mon Dec 31 15:53:24 MST 2007 META-INF/application.xml
| mjhammel(tty10)$ cat META-INF/application.xml
| <?xml version="1.0" encoding="ISO-8859-1"?>
|
| <!DOCTYPE application PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application 1.2//EN' 'http://java.sun.com/j2ee/dtds/application_1_2.dtd'>
|
| <application>
| <display-name>crunch</display-name>
| <description>crunch EAR </description>
| <module>
| <ejb>crunch-ejb.jar</ejb>
| </module>
| <module>
| <java>crunch-common.jar</java>
| </module>
| <module>
| <web>
| <web-uri>crunch-web.war</web-uri>
| <context-root>/Crunch</context-root>
| </web>
| </module>
| </application>
| mjhammel(tty10)$ cat META-INF/jboss-app.xml
| <jboss-app>
| <loader-repository>
| Crunch:archive=Crunch.ear
| </loader-repository>
| </jboss-app>
| mjhammel(tty10)$ jar tvf crunch-ejb.jar
| 0 Mon Dec 31 15:53:18 MST 2007 META-INF/
| 106 Mon Dec 31 15:53:18 MST 2007 META-INF/MANIFEST.MF
| 0 Mon Dec 31 15:53:16 MST 2007 com/
| 0 Mon Dec 31 15:53:16 MST 2007 com/cei/
| 0 Mon Dec 31 15:53:16 MST 2007 com/cei/crunch/
| 0 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/
| 4349 Mon Dec 31 15:53:16 MST 2007 com/cei/crunch/ejb/Analysisresult.class
| 4781 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/AnalysisresultHome.class
| 2385 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/Application.class
| 4727 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/ApplicationHome.class
| 2974 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/Computeros.class
| 4709 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/ComputerosHome.class
| 1305 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/Configdata.class
| 4709 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/ConfigdataHome.class
| 2956 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/Cpu.class
| 4583 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/CpuHome.class
| 2580 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/Dir.class
| 4583 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/DirHome.class
| 5810 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/Fileservice.class
| 4727 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/FileserviceHome.class
| 5018 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/Filetype.class
| 4673 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/FiletypeHome.class
| 3439 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/Fusionalgorithm.class
| 4799 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/FusionalgorithmHome.class
| 2651 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/Fusionalgorithmresult.class
| 4907 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/FusionalgorithmresultHome.class
| 2132 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/Fusionjobsetting.class
| 4817 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/FusionjobsettingHome.class
| 2853 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/Fusionrequestorsetting.class
| 4925 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/FusionrequestorsettingHome.class
| 2238 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/Fusionresult.class
| 4745 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/FusionresultHome.class
| 3347 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/Groups.class
| 4637 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/GroupsHome.class
| 2458 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/Insertionalgorithm.class
| 4853 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/InsertionalgorithmHome.class
| 1598 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/Interpreter.class
| 4727 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/InterpreterHome.class
| 10615 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/Job.class
| 4583 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/JobHome.class
| 1935 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/Jobfusionresult.class
| 4799 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/JobfusionresultHome.class
| 1839 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/Jobtask.class
| 4655 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/JobtaskHome.class
| 2384 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/Jobtool.class
| 4655 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/JobtoolHome.class
| 2844 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/Organizations.class
| 4763 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/OrganizationsHome.class
| 1859 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/Profileadmin.class
| 4745 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/ProfileadminHome.class
| 3551 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/Profilerequestor.class
| 4817 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/ProfilerequestorHome.class
| 1832 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/Profiletoolpublisher.class
| 4889 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/ProfiletoolpublisherHome.class
| 7022 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/Profileworker.class
| 4763 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/ProfileworkerHome.class
| 1773 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/Roles.class
| 4619 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/RolesHome.class
| 9852 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/Serverstat.class
| 4709 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/ServerstatHome.class
| 15991 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/Subscriber.class
| 4709 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/SubscriberHome.class
| 2486 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/Subscribersession.class
| 4835 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/SubscribersessionHome.class
| 9566 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/Task.class
| 4601 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/TaskHome.class
| 1971 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/Taskanalysisresult.class
| 4853 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/TaskanalysisresultHome.class
| 3068 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/Taskdatum.class
| 4691 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/TaskdatumHome.class
| 1984 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/Taskfiles.class
| 4691 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/TaskfilesHome.class
| 5266 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/Taskinvocation.class
| 4781 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/TaskinvocationHome.class
| 3050 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/Tasklogs.class
| 4673 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/TasklogsHome.class
| 2124 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/Taskreject.class
| 4709 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/TaskrejectHome.class
| 6247 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/Taskworkerinfo.class
| 4781 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/TaskworkerinfoHome.class
| 2812 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/Teams.class
| 4619 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/TeamsHome.class
| 9969 Mon Dec 31 15:53:16 MST 2007 com/cei/crunch/ejb/Tool.class
| 4601 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/ToolHome.class
| 1832 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/Toolcpu.class
| 4655 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/ToolcpuHome.class
| 1892 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/Toolfiletype.class
| 4745 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/ToolfiletypeHome.class
| 1819 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/Tooloption.class
| 4709 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/TooloptionHome.class
| 1876 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/Toolos.class
| 4637 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/ToolosHome.class
| 3729 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/Toolparameter.class
| 4763 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/ToolparameterHome.class
| 2429 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/Tooltype.class
| 4673 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/TooltypeHome.class
| 14036 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/Usercomputer.class
| 4745 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/UsercomputerHome.class
| 1813 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/Viewlevels.class
| 4709 Mon Dec 31 15:53:18 MST 2007 com/cei/crunch/ejb/ViewlevelsHome.class
| 658 Fri Dec 28 17:25:00 MST 2007 META-INF/persistence.xml
| <persistence>
| <persistence-unit name="Crunch">
| <jta-data-source>java:/CrunchDS</jta-data-source>
| <properties>
| <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
| <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/>
| <property name="hibernate.connection.driver_class" value="com.mysql.jdbc.Driver"/>
| <property name="hibernate.connection.url" value="jdbc:mysql://localhost/crunch"/>
| <property name="hibernate.connection.username" value="root"/>
| <!--
| <property name="hibernate.connection.password" value="rods"/>
| -->
| </properties>
| </persistence-unit>
| </persistence>
| mjhammel(tty10)$ jar tvf crunch-web.war
| 0 Mon Dec 31 16:13:26 MST 2007 META-INF/
| 106 Mon Dec 31 16:13:24 MST 2007 META-INF/MANIFEST.MF
| 0 Mon Dec 31 15:53:00 MST 2007 WEB-INF/
| 0 Thu Dec 27 09:58:30 MST 2007 WEB-INF/classes/
| 361 Mon Dec 31 15:51:34 MST 2007 WEB-INF/jboss-web.xml
| 4980 Mon Dec 31 16:13:24 MST 2007 WEB-INF/server-config.wsdd
| 4261 Mon Dec 31 15:53:00 MST 2007 WEB-INF/web.xml
| mjhammel(tty10)$ cat WEB-INF/jboss-web.xml
| <?xml version="1.0" encoding="ISO-8859-1"?>
| <jboss-web>
| <context-root>Crunch</context-root>
| <!-- <security-domain>java:/jaas/defaultAuth</security-domain> -->
| <security-domain>java:/jaas/CrunchDBRealm</security-domain>
|
| <resource-ref>
| <res-ref-name>jdbc/CrunchDS</res-ref-name>
| <jndi-name>java:/CrunchDS</jndi-name>
| </resource-ref>
|
| </jboss-web>
| mjhammel(tty10)$ cat WEB-INF/web.xml
| <!DOCTYPE web-app PUBLIC
| "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
| "http://java.sun.com/dtd/web-app_2_3.dtd">
|
| <web-app>
|
| <servlet>
| <servlet-name>AxisServlet</servlet-name>
| <display-name>Apache-Axis Servlet</display-name>
| <servlet-class>
| org.apache.axis.transport.http.AxisServlet
| </servlet-class>
| </servlet>
|
| <servlet-mapping>
| <servlet-name>AxisServlet</servlet-name>
| <url-pattern>/servlet/AxisServlet</url-pattern>
| </servlet-mapping>
|
| <servlet-mapping>
| <servlet-name>AxisServlet</servlet-name>
| <url-pattern>*.jws</url-pattern>
| </servlet-mapping>
|
| <servlet-mapping>
| <servlet-name>AxisServlet</servlet-name>
| <url-pattern>/services/*</url-pattern>
| </servlet-mapping>
|
|
| <session-config>
| <!-- Default to 5 minute session timeouts -->
| <session-timeout>5</session-timeout>
| </session-config>
|
| <!-- currently the W3C havent settled on a media type for WSDL;
| http://www.w3.org/TR/2003/WD-wsdl12-20030303/#ietf-draft
| for now we go with the basic 'it's XML' response -->
| <mime-mapping>
| <extension>wsdl</extension>
| <mime-type>text/xml</mime-type>
| </mime-mapping>
|
|
| <mime-mapping>
| <extension>xsd</extension>
| <mime-type>text/xml</mime-type>
| </mime-mapping>
|
|
| <!-- Define which parts of the server are protected by authentication features. -->
| <security-constraint>
|
| <web-resource-collection>
| <web-resource-name>Crunch META INF</web-resource-name>
| <description>Require users to authenticate</description>
| <url-pattern>/*</url-pattern>
| <http-method>POST</http-method>
| <http-method>GET</http-method>
| </web-resource-collection>
|
| <auth-constraint>
| <description>Only allow Authenticated_users role</description>
| <role-name>Authenticated_users</role-name>
| <role-name>BASIC</role-name>
| <role-name>ADMIN</role-name>
| <role-name>GUEST</role-name>
| <role-name>REQUESTOR</role-name>
| <role-name>WORKER</role-name>
| <role-name>TOOL-PUBLISHER</role-name>
| <role-name>REGISTRAR</role-name>
| </auth-constraint>
|
| <user-data-constraint>
| <description>Encryption is not required for the application in general.
| </description>
| <transport-guarantee>NONE</transport-guarantee>
| </user-data-constraint>
|
| </security-constraint>
|
| <security-role>
| <description>Crunch Authenticated Subscribers</description>
| <role-name>Authenticated_users</role-name>
| </security-role>
| <security-role>
| <description>Crunch Basic Subscriber</description>
| <role-name>BASIC</role-name>
| </security-role>
| <security-role>
| <description>Crunch Guest Subscriber</description>
| <role-name>GUEST</role-name>
| </security-role>
| <security-role>
| <description>Crunch Admin</description>
| <role-name>ADMIN</role-name>
| </security-role>
| <security-role>
| <description>Crunch Requestor Subscriber</description>
| <role-name>REQUESTOR</role-name>
| </security-role>
| <security-role>
| <description>Crunch Worker Subscriber</description>
| <role-name>WORKER</role-name>
| </security-role>
| <security-role>
| <description>Crunch Tool Publisher Subscriber</description>
| <role-name>TOOL-PUBLISHER</role-name>
| </security-role>
| <security-role>
| <description>Registrar</description>
| <role-name>REGISTRAR</role-name>
| </security-role>
|
| <!-- BASIC authentication pops up a login dialog box -->
| <login-config>
| <auth-method>BASIC</auth-method>
| <realm-name>defaultAuth</realm-name>
| <!--
| <form-login-config>
| <form-login-page>/jsp/login.jsp</form-login-page>
| <form-error-page>/login_error.html</form-error-page>
| </form-login-config>
| -->
| </login-config>
|
| <resource-ref>
| <res-ref-name>jdbc/CrunchDS</res-ref-name>
| <res-type>javax.sql.DataSource</res-type>
| <res-auth>Container</res-auth>
| </resource-ref>
|
| </web-app>
| mjhammel(tty10)$ cat WEB-INF/server-config.wsdd
| <?xml version="1.0" encoding="UTF-8"?>
| <deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
| <globalConfiguration>
| <parameter name="adminPassword" value="admin"/>
| <parameter name="enableNamespacePrefixOptimization" value="false"/>
| <parameter name="dotNetSoapEncFix" value="true"/>
| <parameter name="disablePrettyXML" value="true"/>
| <parameter name="attachments.implementation" value="org.apache.axis.attachments.AttachmentsImpl"/>
| <parameter name="sendXsiTypes" value="true"/>
| <parameter name="sendMultiRefs" value="true"/>
| <parameter name="sendXMLDeclaration" value="true"/>
| <requestFlow>
| <handler type="java:org.apache.axis.handlers.JWSHandler">
| <parameter name="scope" value="session"/>
| </handler>
| <handler type="java:org.apache.axis.handlers.JWSHandler">
| <parameter name="scope" value="request"/>
| <parameter name="extension" value=".jwr"/>
| </handler>
| </requestFlow>
| </globalConfiguration>
| <handler name="LocalResponder" type="java:org.apache.axis.transport.local.LocalResponder"/>
| <handler name="URLMapper" type="java:org.apache.axis.handlers.http.URLMapper"/>
| <handler name="Authenticate" type="java:org.apache.axis.handlers.SimpleAuthenticationHandler"/>
| <service name="AdminService" provider="java:MSG">
| <parameter name="allowedMethods" value="AdminService"/>
| <parameter name="enableRemoteAdmin" value="false"/>
| <parameter name="className" value="org.apache.axis.utils.Admin"/>
| <namespace>http://xml.apache.org/axis/wsdd/</namespace>
| </service>
| <service name="Version" provider="java:RPC">
| <parameter name="allowedMethods" value="getVersion"/>
| <parameter name="className" value="org.apache.axis.Version"/>
| </service>
| <service name="SubscriberServices" provider="java:RPC">
| <operation name="createSubscriber" qname="ns1:createSubscriber" soapAction="" xmlns:ns1="urn:Crunch">
| <parameter name="in0" type="ns2:Subscriber" xmlns:ns2="http://ejb.crunch.cei.com"/>
| </operation>
| <operation name="findSubscriber" qname="ns4:findSubscriber" returnQName="findSubscriberReturn" returnType="ns3:Subscriber" soapAction="" xmlns:ns3="http://ejb.crunch.cei.com" xmlns:ns4="urn:Crunch">
| <parameter name="in0" type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"/>
| </operation>
| <operation name="createSubscriberSession" qname="ns5:createSubscriberSession" soapAction="" xmlns:ns5="urn:Crunch">
| <parameter name="in0" type="ns6:Subscribersession" xmlns:ns6="http://ejb.crunch.cei.com"/>
| </operation>
| <operation name="findSubscriberSession" qname="ns8:findSubscriberSession" returnQName="findSubscriberSessionReturn" returnType="ns7:Subscribersession" soapAction="" xmlns:ns7="http://ejb.crunch.cei.com" xmlns:ns8="urn:Crunch">
| <parameter name="in0" type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"/>
| </operation>
| <parameter name="wsdlServicePort" value="SubscriberServices"/>
| <parameter name="className" value="com.cei.crunch.server.SubscriberServices.SubscriberServicesEndpoint"/>
| <parameter name="typeMappingVersion" value="1.2"/>
| <parameter name="allowedMethods" value="findSubscriber createSubscriber findSubscriberSession createSubscriberSession"/>
| <parameter name="wsdlServiceElement" value="SubscriberServicesService"/>
| <parameter name="wsdlTargetNamespace" value="urn:Crunch"/>
| <parameter name="wsdlPortType" value="SubscriberServices"/>
| <parameter name="scope" value="Session"/>
| <parameter name="schemaUnqualified" value="http://ejb.crunch.cei.com,urn:Crunch"/>
| <typeMapping deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" qname="ns9:Subscribersession" serializer="org.apache.axis.encoding.ser.BeanSerializerFactory" type="java:com.cei.crunch.ejb.Subscribersession" xmlns:ns9="http://ejb.crunch.cei.com"/>
| <typeMapping deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" qname="ns10:Subscriber" serializer="org.apache.axis.encoding.ser.BeanSerializerFactory" type="java:com.cei.crunch.ejb.Subscriber" xmlns:ns10="http://ejb.crunch.cei.com"/>
| <arrayMapping innerType="xsd:anyType" languageSpecificType="java:java.lang.Object[]" qname="ns11:ArrayOf_xsd_anyType" xmlns:ns11="urn:Crunch" xmlns:xsd="http://www.w3.org/2001/XMLSchema"/>
| </service>
| <transport name="http">
| <requestFlow>
| <handler type="URLMapper"/>
| <handler type="java:org.apache.axis.handlers.http.HTTPAuthHandler"/>
| </requestFlow>
| <parameter name="qs:list" value="org.apache.axis.transport.http.QSListHandler"/>
| <parameter name="qs:wsdl" value="org.apache.axis.transport.http.QSWSDLHandler"/>
| <parameter name="qs:method" value="org.apache.axis.transport.http.QSMethodHandler"/>
| </transport>
| <transport name="local">
| <responseFlow>
| <handler type="LocalResponder"/>
| </responseFlow>
| </transport>
| </deployment>
| mjhammel(tty10)$ jar tvf crunch-common.jar
| 0 Mon Dec 31 16:13:20 MST 2007 META-INF/
| 106 Mon Dec 31 16:13:18 MST 2007 META-INF/MANIFEST.MF
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4116214#4116214
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4116214
16 years, 10 months
[Persistence, JBoss/CMP, Hibernate, Database] - Exception with Toplink
by vaidya1973
Has anyone seen this exception. I am running jboss 4.0.4-GA and am using jpa with toplink essentials to read from the database ..
Caused by: javax.persistence.PersistenceException: Exception [TOPLINK-28018] (Or
acle TopLink Essentials - 2.0 (Build b41-beta2 (03/30/2007))): oracle.toplink.es
sentials.exceptions.EntityManagerSetupException
Exception Description: predeploy for PersistenceUnit [toplinkLocal] failed.
Internal Exception: Exception [TOPLINK-30007] (Oracle TopLink Essentials - 2.0 (
Build b41-beta2 (03/30/2007))): oracle.toplink.essentials.exceptions.Persistence
UnitLoadingException
Exception Description: An exception was thrown while loading class: <<Class name>> to check whether it implements @Entity, @Embe
ddable, or @MappedSuperclass.
Internal Exception: java.lang.ClassNotFoundException: <>
at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.pr
edeploy(EntityManagerSetupImpl.java:615)
at oracle.toplink.essentials.internal.ejb.cmp3.JavaSECMPInitializer.call
Predeploy(JavaSECMPInitializer.java:146)
at oracle.toplink.essentials.internal.ejb.cmp3.JavaSECMPInitializer.init
PersistenceUnits(JavaSECMPInitializer.java:226)
at oracle.toplink.essentials.internal.ejb.cmp3.JavaSECMPInitializer.init
ialize(JavaSECMPInitializer.java:242)
at oracle.toplink.essentials.internal.ejb.cmp3.JavaSECMPInitializer.init
ializeFromMain(JavaSECMPInitializer.java:278)
at oracle.toplink.essentials.internal.ejb.cmp3.JavaSECMPInitializer.getJ
avaSECMPInitializer(JavaSECMPInitializer.java:81)
at oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider.creat
eEntityManagerFactory(EntityManagerFactoryProvider.java:119)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.
java:83)
at org.springframework.orm.jpa.LocalEntityManagerFactoryBean.createNativ
eEntityManagerFactory(LocalEntityManagerFactoryBean.java:91)
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPro
pertiesSet(AbstractEntityManagerFactoryBean.java:251)
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1390)
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.initializeBean(AbstractAutowireCapableBeanFactory.java:1359)
... 83 more
Caused by: Exception [TOPLINK-28018] (Oracle TopLink Essentials - 2.0 (Build b41
-beta2 (03/30/2007))): oracle.toplink.essentials.exceptions.EntityManagerSetupEx
ception
Exception Description: predeploy for PersistenceUnit [toplinkLocal] failed.
Internal Exception: Exception [TOPLINK-30007] (Oracle TopLink Essentials - 2.0 (
Build b41-beta2 (03/30/2007))): oracle.toplink.essentials.exceptions.Persistence
UnitLoadingException
Exception Description: An exception was thrown while loading class: c<> to check whether it implements @Entity, @Embe
ddable, or @MappedSuperclass.
Internal Exception: java.lang.ClassNotFoundException: <>
at oracle.toplink.essentials.exceptions.EntityManagerSetupException.pred
eployFailed(EntityManagerSetupException.java:212)
... 95 more
Caused by: Exception [TOPLINK-30007] (Oracle TopLink Essentials - 2.0 (Build b41
-beta2 (03/30/2007))): oracle.toplink.essentials.exceptions.PersistenceUnitLoadi
ngException
Exception Description: An exception was thrown while loading class: <> to check whether it implements @Entity, @Embe
ddable, or @MappedSuperclass.
Internal Exception: java.lang.ClassNotFoundException: <>
at oracle.toplink.essentials.exceptions.PersistenceUnitLoadingException.
exceptionLoadingClassWhileLookingForAnnotations(PersistenceUnitLoadingException.
java:145)
at oracle.toplink.essentials.ejb.cmp3.persistence.PersistenceUnitProcess
or.isEntity(PersistenceUnitProcessor.java:304)
at oracle.toplink.essentials.internal.ejb.cmp3.metadata.MetadataProcesso
r.buildEntityClassSetFromAnnotations(MetadataProcessor.java:476)
at oracle.toplink.essentials.internal.ejb.cmp3.metadata.MetadataProcesso
r.buildEntityList(MetadataProcessor.java:447)
at oracle.toplink.essentials.ejb.cmp3.persistence.PersistenceUnitProcess
or.processORMetadata(PersistenceUnitProcessor.java:346)
at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.pr
edeploy(EntityManagerSetupImpl.java:584)
... 94 more
Caused by: java.lang.ClassNotFoundException: <>
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 oracle.toplink.essentials.internal.ejb.cmp3.JavaSECMPInitializer$Temp
EntityLoader.loadClass(JavaSECMPInitializer.java:356)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at oracle.toplink.essentials.ejb.cmp3.persistence.PersistenceUnitProcess
or.isEntity(PersistenceUnitProcessor.java:301)
... 98 more
17:00:43,951 INFO [STDOUT] [TopLink Finer]: 2007.12.31 05:00:43.951--UnitOfWork
(30357264)--Thread(Thread[RMI TCP Connection(2)-10.151.220.141,5,RMI Runtime])--
TX beforeCompletion callback, status=STATUS_ACTIVE
17:00:43,951 INFO [STDOUT] [TopLink Finer]: 2007.12.31 05:00:43.951--UnitOfWork
(30357264)--Thread(Thread[RMI TCP Connection(2)-10.151.220.141,5,RMI Runtime])--
begin unit of work commit
17:00:43,961 WARN [TxConnectionManager] Prepare called on a local tx. Use of lo
cal transactions on a jta transaction with more than one branch may result in in
consistent data in some cases of failure.
17:00:43,971 INFO [STDOUT] [TopLink Finer]: 2007.12.31 05:00:43.971--UnitOfWork
(30357264)--Thread(Thread[RMI TCP Connection(2)-10.151.220.141,5,RMI Runtime])--
TX afterCompletion callback, status=COMMITTED
17:00:43,971 INFO [STDOUT] [TopLink Finer]: 2007.12.31 05:00:43.971--UnitOfWork
(30357264)--Thread(Thread[RMI TCP Connection(2)-10.151.220.141,5,RMI Runtime])--
end unit of work commit
17:00:43,971 INFO [STDOUT] [TopLink Finer]: 2007.12.31 05:00:43.971--UnitOfWork
(30357264)--Thread(Thread[RMI TCP Connection(2)-10.151.220.141,5,RMI Runtime])--
release unit of work
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4116213#4116213
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4116213
16 years, 10 months
[EJB/JBoss] - JNDI Lookup error after deploying EJB3 jar as a part of J2EE
by irajeev
hi,
I have deployed the EJB3 jar(having 1 stateless session EJB) in the J2EE 1.4 EAR in JBOSS 4.0.4. The log file and the JNDI dump(from the JMX admin screen) show that the EJB has been deployed. But when I try to lookup the EJB from an external standalone java program I get the following exception,
javax.naming.NameNotFoundException: TestBean not bound
at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
at org.jnp.server.NamingServer.lookup(NamingServer.java:267)
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 sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
at sun.rmi.transport.Transport$1.run(Transport.java:153)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
at java.lang.Thread.run(Thread.java:595)
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknown Source)
at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)
at sun.rmi.server.UnicastRef.invoke(Unknown Source)
at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:625)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
at javax.naming.InitialContext.lookup(Unknown Source)
at com.test.test.TestClient123.main(TestClient123.java:35)
Exception in thread "main" java.lang.RuntimeException: javax.naming.NameNotFoundException: TestBean not bound
at com.test.test.TestClient123.main(TestClient123.java:39)
Caused by: javax.naming.NameNotFoundException: TestBean not bound
at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
at org.jnp.server.NamingServer.lookup(NamingServer.java:267)
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 sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
at sun.rmi.transport.Transport$1.run(Transport.java:153)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
at java.lang.Thread.run(Thread.java:595)
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknown Source)
at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)
at sun.rmi.server.UnicastRef.invoke(Unknown Source)
at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:625)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
at javax.naming.InitialContext.lookup(Unknown Source)
at com.test.test.TestClient123.main(TestClient123.java:35)
My lookup code:
Context context;
try {
context = new InitialContext();
Test beanRemote = (Test) context.lookup(TestBean.class.getSimpleName()+"/remote");
beanRemote.test();
} catch (NamingException e) {
e.printStackTrace();
throw e;
}
And if I deploy the EJB jar separately instead of as a part of EAR then I am able to lookup. Does the lookup name change if I deploy it in an EAR file?
Thanks in advance...
Rajeev
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4116209#4116209
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4116209
16 years, 10 months