Remote Interface problem using Sun ONE App & web server

HI,
1) I am using an S'less SB. I have local & remote interfaces. I am using the sun one appserver7 & the sun ones's htttp server. By default it doesnt pick up the remote interfaces is it ? How do i make my remote interfaces work ? what are the changes required in config/xml ?
2) However i changed my client code (i.e my action class which is called by the struts action servlet ) to access the localhome rather than the remote home, but then i get java.lang.classcastexception.
pls help !
sanjay

Hi parsuram,
Thanks for the tip. After looking at the sample source code, I did finally figure out the solution - so I'll post it in case anyone else happens to be working with websphere studio has the same issue deploying on sun one.
To access local interface ejb, you must have the following
1. ejb-local-ref tag in the ejb-jar.xml like so underneath the <session> or <entity> tag of the bean which you plan to access the local ejb with.
<ejb-local-ref>
<ejb-ref-name>TestL</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local-home>memory.simple.TestLLocalHome</local-home>
<local>memory.tool.simple.TestLLocal</local>
<ejb-link>TestL</ejb-link>
</ejb-local-ref>
2. similar ejb-ref tag in sun-ejb-jar.xml
<ejb-ref>
<ejb-ref-name>TestL</ejb-ref-name>
<jndi-name>localejbs/module_memory.betaEJB/TestL68640023372300293</jndi-name>
</ejb-ref>
note: sun generates the <jndi-name> and overwrites whatever you put in that tag no matter what you put in there.
3. here is the code to access
Context initial = new InitialContext();
TestLLocalHome tlHome=(TestLLocalHome) Initial.lookup
("TestL");
//the string must match <ejb-ref-name> underneath <ejb-local-ref>
4. note that the jndi name for the local interface bean becomes irrelevant. only the <ejb-ref-name> in the ejb-jar and sun-ejb-jar matter. furthermore, both <ejb-ref-name> must be the same or you won't be able to deploy.
5. This is completely my fault for not checking the "proper" way to access local interfaces. in websphere, they let you get away without the ejb-ref tags and just use the string "local:/TestL"!
-matt

Similar Messages

  • DB lookup problem with Sun One App. Server 7.0,MySQL3.x - Red hat linux 7.2

    Hi Group,
    I have deployed my project in sun one application server 7.0 installed in red hat linux 7.2 and database is mysql. Its working in fine in normal conditions. I could not able to get connection from datasource after I kept my server 10 hours ideal. Again its working fine once I restarted the server. Please give me any solution to prevent this.
    The same project is working fine under all conditions in Sun one app server 7.0 installed in windows 2000 server without any look up probem. I Got this problem only in linux OS.
    mysql datasource class com.mysql.jdbc.jdbc2.optional.MysqlDataSource
    please find the below code..
    Context ctx = new InitialContext();
    Datasource testDS = (javax.sql.DataSource)ctx.lookup( "jdbc/testDS");
    Connection con = testDs.getConnection();
    connection pool settings
    <jdbc-connection-pool steady-pool-size="8" max-pool-size="32" max-wait-time-in-millis="0" pool-resize-quantity="2" idle-timeout-in-seconds="0" is-isolation-level-guaranteed="false" is-connection-validation-required="false" connection-validation-method="auto-commit" fail-all-connections="false" datasource-classname="com.mysql.jdbc.jdbc2.optional.MysqlDataSource" name="testCP">
    <property value="localhost" name="serverName"/>
    <property value="3306" name="portNumber"/>
    <property value="root" name="user"/>
    <property value="test" name="databaseName"/>
    </jdbc-connection-pool>
    Regards,
    Hari haran

    My team solved the problem and I thought that we would share.
    The version of Xalan that was packaged with the JRE, that is installed by the Sun One app server, was at least 2 versions out of date. Updating the Xalan package solves the issue and the WAR file now works.
    Again, this appears to be only on the Linux version as the package deploys and works perfectly on the Windows version.

  • Jdeveloper 9i with Sun ONE (iPlanet) Web Server 6.0

    Hi,
    Has any one working Jdeveloper 9i with Sun ONE (iPlanet) Web Server 6.0 ?
    When i add new application server it gives only Oracle App Server and Web Logic.
    Thanks
    Ramesh

    Currently JDeveloper provides Application server connections to Oracle9iAS and WebLogic, which can be used to deploy J2EE Modules.
    JDeveloper allows to create assemble generic J2EE archives from projects which can used to deploy to other application servers.
    Check out How-To documents on this topic
    http://otn.oracle.com/products/jdev/howtos/content.html
    raghu
    JDev Team

  • Sun One Java web server 6.1 caching!

    hi,
    when a client browser access my site for the first time he download images from the server with
    timestamp of the file last modified and an ETAG numeber.
    the client browser cache the images file in his browser local cahce.
    when the client browser open on the second time accessing my site, the browser will compare the last modifed
    and ETAG of the image to see if the image in the browser local cache needs to be updated meaning downloaded.
    what i want is that the client browser wont ask the web server if the image was change at any time and only using the browser local cache meaning disabling the last modifed and ETAG mechanisem OR setting a time expiriation on my web server files that the client browser will know to look for updates in a specifc time that i will define.
    help will be most appreciated.
    thanks in advanced

    This is for 6.0, but I'm quite sure it hasn't changed to 6.1.
    # Cache static content 1 month
    <Object name="Cache" ppath="*/static/*.(js|css|gif|jpg|png)">
    PathCheck fn="set-cache-control" control="max-age=2678400"
    </Object>
    Obviously, you will want to change the ppath to something that fits your needs. The age is defined in seconds, this example is set to 31 days, or perhaps 30...I don't remember. :)
    To enable caching for everything, just put the PathCheck directive inside the default Object-tag like always. Or instead of ppath, you can use NameTrans assign-name directives. The important part is the PathCheck, up to you how to restrict it.

  • Problem calling entity bean from session bean using sun one app server

    Hi,
    I am getting the following exception while calling entity bean(bmp) from stateless session(cmp)bean.
    SEVERE: IOP5012: Some runtime exception ocurred in IIOP: [javax.ejb.EJBException: nested exception is: java.lang.RuntimeException: Unable to create reference org.omg.CORBA.OBJ_ADAPTER: vmcid: SUN minor code: 1015 completed: No]
    SEVERE: IOP5013: Unable to create reference: [org.omg.CORBA.OBJ_ADAPTER: vmcid: SUN minor code: 1015 completed: No]
    SEVERE: EJB5029: Exception getting ejb context : [CustomerEJB]
    SEVERE:
    WARNING: CORE3283: stderr: javax.transaction.TransactionRolledbackException: CORBA TRANSACTION_ROLLEDBACK 9998 Maybe; nested exception is:
    WARNING: CORE3283: stderr: org.omg.CORBA.TRANSACTION_ROLLEDBACK: vmcid: 0x2000 minor code: 1806 completed: Maybe
    WARNING: CORE3283: stderr: at com.sun.corba.ee.internal.iiop.ShutdownUtilDelegate.mapSystemException(ShutdownUtilDelegate.java:114)
    WARNING: CORE3283: stderr: at com.sun.corba.ee.internal.javax.rmi.CORBA.Util.wrapException(Util.java:358)
    WARNING: CORE3283: stderr: at javax.rmi.CORBA.Util.wrapException(Util.java:277)
    WARNING: CORE3283: stderr:
    My primary key implementation is
    public class CustomerEJBKey implements java.io.Serializable {
    static final long serialVersionUID = 3206093459760846163L;
    public String customerId;
    public DBConfigBean dbConfigBean;
    * Creates an empty key for Entity Bean: CustomerEJB
    /*public CustomerEJBKey() {
    public CustomerEJBKey(String customerId,DBConfigBean dbConfigBean){
    this.customerId = customerId;
    this.dbConfigBean = dbConfigBean;
    public String getCustomer(){
    return customerId;
    public DBConfigBean getDBConfigBean(){
    return dbConfigBean;
    * Returns true if both keys are equal.
    public boolean equals(Object key) {
    if(key instanceof CustomerEJBKey)
    return this.customerId.equals(((CustomerEJBKey)key).customerId) &&
    this.dbConfigBean.equals(((CustomerEJBKey)key).dbConfigBean);
    else
    return false;
    * Returns the hash code for the key.
    public int hashCode() {
    return customerId.hashCode() + dbConfigBean.hashCode();
    and entity bean method invocation is,
    homeFactory = EJBHomeFactory.getInstance();
    home = (CustomerEJBHome) homeFactory.lookup(CustomerEJBHome.class);
    remote = (CustomerEJB) PortableRemoteObject.narrow( home.findByPrimaryKey(new CustomerEJBKey(customerId,dbBean)), CustomerEJB.class);
    This works fine in Websphere and JBoss. Do you have any idea why I am getting this exception?
    Appreciate your response.
    Regards,
    Sankar.

    My suggestion is to put some System.out.println() statements and see if the output helps in any way in debugging. I can't think of anything on the top of my head although I have been working lightly on SunONE.
    By the way, you referred the stateless bean as CMP. Just wanted to tell you that you are wrong. The terms CMP and BMP refer to persistence, which is applied to Database tables and not to stateless/stateful session beans which are written for some specific purpose independent of underlying database.

  • Deploying a web application on Sun One app server 7

    Hi,
    I am not able to deploy a web application on sun one server using Sun java studio.
    I have created Jsp, Servlet, Session bean and entity bean.
    When I am creating a web_module in the directory where JSP are kept, it is giving me error "directory is already mounted.
    I have already created EJB modules for both the Session and entity bean.
    Can some one tell me the cause / solution of this problem.

    Hi Amol,
    Thank you very much for replying my question. The contents in my application.xml are:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN" "http://java.sun.com/dtd/application_1_3.dtd">
    <application>
    <display-name>testwsapp</display-name>
    <description>J2EE Application testwsapp</description>
    <module>
    <web>
    <web-uri>testws_War.war</web-uri>
    <context-root>testws</context-root>
    </web>
    <alt-dd>testws_War.xml</alt-dd>
    </module>
    </application>
    The contents in jaxrpc-ri-runtime.xml are:
    <?xml version="1.0" encoding="UTF-8"?>
    <endpoints xmlns='http://java.sun.com/xml/ns/jax-rpc/ri/runtime' version='1.0'>
    <endpoint
    name='testws'
    interface='contactws.testwsGenServer.testwsRPC'
    implementation='contactws.testwsGenServer.testwsRPCBean'
    tie='contactws.testwsGenServer.testwsRPC_Tie'
    model='null'
    wsdl='/WEB-INF/testws.wsdl'
    service='{urn:testws/wsdl}Testws'
    port='{urn:testws/wsdl}testwsRPCPort'
    urlpattern='/testws'
    </endpoint></endpoints>
    I tried to access and check the web service using:
    http://servername:port/testws/testws
    The first testws is contextroot named and the second testws is url pattern, which was exactly like what you mentioned but I got "404 Not Found" error.
    By the way, using the same ear to deploy to Windows Sun ONE App. Server 7 env. and then using the same url, I can access the web service. I am wondering if there is any special for deploying Web Service on Unix Sun ONE app. Server 7 env. or I missed something?
    I hope I can hear from you soon.
    Thank you again,
    Jackie

  • Problems installing Sun ONE Web Server 7.0 on an x86 with Solaris 10

    I am trying to install the new Sun ONE Java Web Server 7.0 on my Solaris 10 machine. This is the error I am getting:
    |-1%--------------25%-----------------50%-----------webResources:errorCreatingLogFile
    Task Failed: java.lang.NullPointsswhereException
    java.lang.NullPointerException
    at com.sun.web.installer.web.actions.PostInstall_core.install(PostInstall_core.java:273)
    at com.sun.install.products.InstallComponent.performInstallation(InstallComponent.java:1465)
    at com.sun.install.products.InstallNode.startInstall(InstallNode.java:1086)
    at com.sun.install.products.InstallComponent.performInstallation(InstallComponent.java:1457)
    at com.sun.install.products.InstallNode.startInstall(InstallNode.java:1086)
    at com.sun.install.products.InstallComponent.performInstallation(InstallComponent.java:1457)
    at com.sun.install.products.Product.performInstallation(Product.java:651)
    at com.sun.install.tasks.ProductTask.perform(ProductTask.java:153)
    at com.sun.wizards.core.Sequence.perform(Sequence.java:343)
    at com.sun.wizards.core.SequenceManager.run(SequenceManager.java:226)
    at java.lang.Thread.run(Thread.java:595)
    This is not a permissions issue, and there are no errors in the /var/sadm/install/logs. Please keep!
    Kristie N. Howard

    Hope, you are considering Sun Web Server 6.1 (formerly known as iPlanet Enterprise Server ) for this task. Yes, it is possible to host multiple instances of web server on a same machine.
    you can create multiple instances using our GUI. here is the pointer to our docs on how to do this - http://docs.sun.com/app/docs/doc/819-6512/6n8h7gq1n?a=view#bhabr
    If you are willing to give Sun Java System Web Server 7 (our latest release - http://www.sun.com/webserver) , then you can do this by CLI as well.
    sun one portal server 3.0 - is a very old release. Are you sure, is this what you want to run ?
    hope this helps

  • Sun One App Server - Oracle Database 10g

    Hi to all:
    I�m developing a web application that uses an Oracle 10g database and a I want to use Sun One Application Server 7, the problem that I have is when I have been deployed the war file into the server and acces to my application, specifically when I try to acces a JSP that extracts data from database, I don't see anything of the information that I need, that's not the problem, the problem is that in the server console appear a message indicating that an SQLException occour and the message is "No suitable driver".
    I test my methods before deploy the war file and the connection and data extraction are correct, I don't know if the version of the JDBC driver for the connection to Oracle Database 10g is incompatible or if it's impossible to use Sun One App Server 7 with a connection with Oracle 10g.
    I tried with other web servers like Tomcat 5.0 and Sun Application Server 9 and the connection it's perfect.
    Could somebody give some ideas or orientation please?????, im student, all help will be appreciated, thanks!!!

    Rahul,
    Yes there is an Enterprise Edition in the works. It will address the load balancing and fail over needs for deployments. More details are available here: http://wwws.sun.com/software/products/appsrvr_ee/home_appsrvr_ee.html
    We will also be releasing more information in the October and November.
    Cheers,
    Stefan Bolka
    Product Line Manager
    Sun ONE Application Server Enterprise Edition

  • Web services problem on SUN ONE Studio4

    Dear All
    I am developing web services using sun ONE studio4 IDE. I am using examples from sun ONE studio documentation. "StockDemo Stock Service" if you know?
    Service is deployed successfully and when i execute the client first page is displayed when i put value in it and press "Invoke".
    An exception is thrown of Tomcat console.
    "Could Not connect with /StockService/StockService"
    My soap RPC URL is as follow
    "http://localhost:8000/StockServiceContext/StockService"
    web service is deployed on j2sdk1.3.1 (port:8000) instace R1 and client is accessing from tomcat web server(port:8081).
    Same case when i make my own stateless session bean and deploy its function with web service.
    I think there is error in soap RPC URL.
    Help me out
    Nadeem

    I'm also having problems with this example.
    MonitorFilter::IOException
    MonitorFilter::A web application object caused an exception
    MonitorFilter::java.rmi.RemoteException: HTTP transport error: java.net.ConnectException: Connection refused: connect; nested exception is:
    HTTP transport error: java.net.ConnectException: Connection refused: connect
    at StockWebServicePack.StockServiceClientGenClient.StockServiceServantInterface_Stub.findCompany(StockServiceServantInterface_Stub.java:79)
    at ......
    Did you find the solution for your problem? , if yes please post the solution.

  • Integration of Sun One Web Server 6.0 with Sun One App Server 7.0

    Is it possible to integrate Sun One Web Server 6.0 with the Sun One App Server 7.0??
    Sun One App Server 7.0 comes with the in-built HTTP listener. But we want to know if there is a way by which we can use the Sun One Web Server 6.0 with the App Server 7.0 and not the in-bulit HTTP listener?

    As suggested by you, I have used Sun ONE Application Server 7's plugin to connect the Sun ONE Web Server 6.0 with Sun ONE Application Server 7 as per the information given in Sun ONE Application Server 7 Administrator's Guide.
    I have added the plugin package to the webserver and added the following into the magnus.conf:
    Init fn="load-modules" shlib="C:/iPlanet/Servers/plugins/passthrough/passthrough.dll" funcs="init-passthrough,auth-passthrough,check-passthrough,service-passthrough" NativeThread="no"
    Init fn="init-passthrough"
    and to the obj.conf
    NameTrans fn="assign-name" from="(/A2P2Test|/A2P2Test/*)" name="passthrough"
    <Object name="passthrough">
    ObjectType fn="force-type" type="magnus-internal/passthrough"
    Service type="magnus-internal/passthrough" fn="service-passthrough" servers="http://<application server http listener>"
    Error reason="Bad Gateway" fn="send-error" uri="$docroot/badgateway.html"
    </Object>
    The webserver starts up without any errors but never forwards any requests what might I be doing wrong?

  • NB & Sun One App Server 8.0 Bundle Admin User/Password & 503 Problem,

    Hi,
    Do you know the the username and password to enter admin console in Netbeans 3.6 & Sun One App Server 8.0 Bundle?
    Also when I executed my first app with the software, I got this message "HTTP Status 503 - This application is not currently available". Can you tell me what is this problem and how to fix it.
    Thanks very much,
    Blessings,
    Lorenzo Jimenez

    Hi,
    Do you see the deployed web application either in the admin console on in the runtime tab explorer of NetBeans, under the
    Sun Java System Application Server 8 --->Applications--->Web Applications
    node?
    503 error is a Service unavailable error:
    "The server is currently unable to handle the HTTP request due to a temporary overloading or maintenance of the server. The implication is that this is a temporary condition which will be alleviated after some delay. "
    Can you try to reload the page for this web app?
    Ludo

  • Problems with Sun One Web Server  6.1 with SP1

    I get errors while compiling my JSP files on SUN one Web Server which is deployed on Solaris 9. it states that cannot compile JSP pages. here is the stack trace that i get.
    [03/Feb/2007:19:11:17] warning (  354): CORE3283: stderr: java.lang.NoClassDefFoundError: com/sun/tools/javac/Main
    [03/Feb/2007:19:11:17] warning (  354): CORE3283: stderr:      at org.apache.jasper.compiler.SunJava14Compiler$JavacTask.run(SunJava14Compiler.java:207)
    [03/Feb/2007:19:11:17] failure (  354): for host 192.168.123.2 trying to GET /reports1/jsp/common/ClientInstall.jsp, service-j2ee reports: StandardWrapperValve[jsp]: WEB2792: Servlet.service() for servlet jsp threw exception
    org.apache.jasper.JasperException: WEB4000: Unable to compile class for JSP
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:312)
         at com.iplanet.ias.web.jsp.JspServlet$JspServletWrapper.loadJSP(JspServlet.java:756)
         at com.iplanet.ias.web.jsp.JspServlet$JspServletWrapper.access$000(JspServlet.java:616)
         at com.iplanet.ias.web.jsp.JspServlet.serviceJspFile(JspServlet.java:401)
         at com.iplanet.ias.web.jsp.JspServlet.service(JspServlet.java:363)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:908)
         at org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:771)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:322)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:209)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
         at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:161)
         at com.iplanet.ias.web.WebContainer.service(WebContainer.java:586)Please help. The Java version i am using is j2sdk1.4.2_08.

    It looks like the Web Server has somehow been configured to use a JRE. Web Server requires a JDK. The following message in particular indicates that a JRE, not a JDK, is being used:java.lang.NoClassDefFoundError: com/sun/tools/javac/MainAre you using the JDK that shipped with Web Server, or did you attempt to configure Web Server to use a different JDK?

  • Problem Re-Installing Sun One App Server 7 on Solaris 8

    I will try my best to describe my problem.
    I successfully installed Sun One App Server 7 Standard Edition on Solaris 8. It was installed on a mounted secondary hard disk. That hard disk has since gone bad. I bought a new hard disk and have that mounted.
    I want to install Sun One App Server 7 again. I am installing through the GUI, but do not the options to install the server even though it is completely gone. I guess the installer seems to think that the product is already installed, even though the previous hard disk with all of the application server files are gone. Is there any way to uninstall or remove the installed status of the application server so I can reinstall?
    Thanks.

    Thanks! I tried the prodreg tool and found the Application Server node, and clicked Uninstall. It went through an uninstall process. Even though it came back with an error, the re-install process after worked great. Thanks again.

  • Can i setup a secure reverse proxy using sun one web proxy server and windows 2000?

    I've tried this on IPlanet Proxy 3.6 and, after reading the documentation, realized that SSL is not supported on the Windows platform. So I'm asking if it is supported using Sun One Web Proxy Server

    Hi,
    Yes, What you say is right.
    "The NT and Windows 2000 versions of iPlanet Web Proxy Server 3.6 do not support SSL".
    Sun One Web Proxy Server is as same as iPlanet webproxy server.
    May be in future relase of proxy server SSL will be supported in Win2000.
    Regards,
    Dakshin.
    Developer Technical Support
    Sun Microsystems
    http://www.sun.com/developers/support.

  • A web server in front of Sun One App 8

    Hi all, I'm trying to port a web site with jsp and servlet and j2ee applications(JMS) from tomcat&Apache to Sun one application server 8. In my old setup, Aapche acts as a front line where static images are served there, php pages and cgi stuff where tomcat is for jsp and servlets.
    So when i try to port it to sun one 8, i got a couple of problems. Sun one 8 doesnt support cgi and php, so i need a web server in front. So i'm thinking either apache or sun web server in front and funnel jsp/servlet to sun one 8. But i dont know how to integrate such setup. With apache and tomcat, theres this JK2/coyote sitting on port 8009. How do i setup a web server (maybe apache or sun one web) with sun one 8?
    Kien

    I'm looking to do the same. Has anyone done this. I'd prefer apache but willing to look at any solution.

Maybe you are looking for

  • HTTP Error 403 - Forbidden after deployed to Oracle Application Server

    I hit HTTP Error 403 - Forbidden every time after I deployed my war file to my Oracle Application Server. Any help? Ming Man

  • Validation by mapping in BPM

    I need to validate an object. I plan to add trasformation step and exception handler for it. Will XI validate data (after mapping) by XMLSchema? For example I added constraint maxLengh=10. Will transformation step throw an exception if length > 10?

  • Exception Error Logging In

    When I enter my ID and password and press Go, the loging box returns Exception Error. How can I fix this?

  • Driver for Printer HP LazerJet 6L (Apr., 1998) Please help!

    Please help! I have a notebook (2012, with Windows 7) and an old (but good) printer HP LazerJet 6L (Apr., 1998). I want this printer with my notebook. Disk with driver was lost during re-moving. At the HP site I foung 4 drivers: HP LaserJet 6L Gold P

  • I write in Arial - It arrives as Times New Roman

    Hi, I have a problem with iMail. In my settings I have set arial as the standard font and all messages im my inbound and outbound box also appear as arial to me. Recipients of my messages though receive them in times new roman and in a different font