Problem with database access in EJB deployment to SJSAS on remote deploy

Hi,
I have deployed an Enterprise application containing an EJB3.0 module to a remote sun application server (Edition 9.0_01 (build b02-p01))
using a mysql ver 5 DB with connector
mysql-connector-java-5.0.0-beta-bin.
It is being used by a swing application client deployed as a module of a separate Enterprise application.
The client can access the session beans but when the EJB tries to create a query with the entity manager the client fails and the following exception appears in the log.
Timestamp:     
Aug 20, 2007 09:36:38.910
Log Level:     
INFO
Logger:     
javax.enterprise.system.container.ejb
Name-Value Pairs:     
_ThreadID=21;_ThreadName=p: thread-pool-1; w: 7;
Record Number:
2239
Message ID:
javax.ejb.EJBTransactionRolledbackException at com.sun.ejb.containers.BaseContainer.mapBusinessInterfaceException(BaseContainer.java
Complete Message
1373)
     at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1290)
     at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:192)
     at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:71)
     at $Proxy329.findAll(Unknown Source)
     at test.TestGuyBean.getTheWordGreat(TestGuyBean.java:36)
     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:597)
     at com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1050)
     at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:165)
     at com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:2766)
     at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:3847)
     at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:190)
     at com.sun.ejb.containers.EJBObjectInvocationHandlerDelegate.invoke(EJBObjectInvocationHandlerDelegate.java:67)
     at $Proxy323.getTheWordGreat(Unknown Source)
     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:597)
     at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:121)
     at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:650)
     at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:193)
     at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1705)
     at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1565)
     at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:947)
     at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:178)
     at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:717)
     at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:473)
     at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.doWork(SocketOrChannelConnectionImpl.java:1270)
     at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:479)
Caused by: javax.ejb.TransactionRolledbackLocalException: Exception thrown from bean; nested exception is:
java.lang.IllegalArgumentException:
An exception occured while creating a query in EntityManager
     at com.sun.ejb.containers.BaseContainer.checkExceptionClientTx(BaseContainer.java:3588)
     at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:3436)
     at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1247)
     ... 30 moreThis is a result of a test portion of the application, but similar results occur when the actual application is run.
The "at test.TestGuyBean.getTheWordGreat(TestGuyBean.java:36)" is
being invoked by the client and "$Proxy329.findAll(Unknown Source)" is where the query is constructed.
The code is as follows
public String getTheWordGreat(String bob){
        String s = "abcdefgh ";
        List<MobileDialingCodes> c =  mobileDialingCodesFacade.findAll();
        for (MobileDialingCodes elem : c) {
            s += elem.getNumber() + " ";
//        System.out.println("bob");
        return s;
public ArrayList<MobileDialingCodesHC> getAllDialingCodes(){
        List allCodesEJB = findAll();
        ArrayList<MobileDialingCodesHC> allCodesHC = new OurArrayList();
        for (Object elem : allCodesEJB) {
            allCodesHC.add(convertEJBtoHC((MobileDialingCodes)elem));
        return allCodesHC;
}The default config for the application is used and the application
uses the netbeans defaults. Netbeans 5.5. Toplink persistence manager.
Any suggestions would be appreciated.
null

Did you try after restarting the iAS server?

Similar Messages

  • Problems with database access in Servlet Apllication (Duke's Bookstore)

    Hi! My name is Elena Veretilo! I am so newbie in JavaEE. So I really need you help and advice!!!
    I started to learn JavaEE with "The JavaEE5 tutorial for Sun Java Application Server 9.1" (http://java.sun.com/javaee/5/docs/tutorial/doc/) and this tutorial recommended the next examples: http://java.sun.com/javaee/5/docs/tutorial/information/download.html. I try to work in NetBeans 6.0 and NetBeans 6.5.
    First problem - I couldn't add Sun Java Application Server 9.1 to NetBeans' server list - it just doesn't see the installed Sun Java Application Server 9.1.
    Second problem - I couldn't run Duke's Bookstore example (from tutorial examples) - something wrong with working (maybe creating or accessing) database. The Database Server started, GlassFish Server also started, so I don't know where the problem could be.
    There is exception:
    Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2006.8 (Build 060830)): oracle.toplink.essentials.exceptions.DatabaseException
    Internal Exception: org.apache.derby.client.am.SqlException: Table/View 'WEB_BOOKSTORE_BOOKS' does not exist.Error Code: -1
    Call:SELECT BOOKID, FIRSTNAME, SURNAME, ONSALE, INVENTORY, CALENDAR_YEAR, TITLE, PRICE, DESCRIPTION FROM WEB_BOOKSTORE_BOOKS WHERE (BOOKID = ?)
    bind => [203]
    Query:ReadObjectQuery(com.sun.bookstore.database.Book)
    If anybody had learned this tutorial and examples or just know what I need to do, please help me!!!!! If it's possible, tell me step by step, what I need to do!
    And one more question - do I really need Sun Java Application Server 9.1 to work with or GlassFish includes Sun Java Application Server 9.1?????

    [http://forums.sun.com/thread.jspa?threadID=5350426]
    Crossposting without notification is very rude. Please stick to one topic.

  • Problem with database Access

    Here i want to retrive columns names in table inside my database . I used Access , but i have error : Server= null !!! why this ?!!
    import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.ResultSetMetaData; import java.sql.Statement; import java.util.logging.Level; import java.util.logging.Logger; public class JDBCTest {     private Connection connection = null;     private static final String DRIVER = "sun.jdbc.odbc.JdbcOdbcDriver";     private static final String DRIVER_URL = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};"             + "Dbq=C:\\Documents and Settings\\a\\Desktop\\JDBCTest";     private Statement statement = null;     public JDBCTest() {     try {             Class.forName(DRIVER);             connection = DriverManager.getConnection(DRIVER_URL);             statement = connection.createStatement();             ResultSet resultSet = statement.executeQuery("select*from InsertClient");             ResultSetMetaData rsm = resultSet.getMetaData();             for (int i = 0; i < rsm.getColumnCount(); i++) {                 String name = rsm.getColumnName(i);                 System.out.println(name);             }         } catch (Exception ex) {             Logger.getLogger(JDBCTest.class.getName()).log(Level.SEVERE, null, ex);         }     }     public static void main(String[] args) {         new JDBCTest();     } } !
    Thanks

    Post the actual exception stack trace.

  • Servlet with Database Access!!!

    Hi !!!!
    I have deployed HelloServlet with Oracle Application Server 4.0.8.1.
    Now I want to connect from Servlet to Oracle8i 8.1.5.
    But, when I try to deploy a Servlet with Database Access, I receive the next:
    "Get operation not allowed"
    The URL used is:
    http://host.domain:port/virtual_path/class_name
    The servlet was compiled using the Sun's jdk from command line. There wasn't compilation errors.
    I run a simple application with database access from command line without problems.
    The drivers and JDBC libraries are operating for this simple application.
    Any help will be appreciated.
    Many thanks
    Sergio

    If you are running OAS 4.0.8.1 and Oracle 8.1.5 on the same machine then this could be the problem. These products are not certified to run on the same machine as they give a path conflict.
    Hope this helps.

  • Problem with file access in other computer in jsp

    I have problem with file accessing in other computer in jsp.
    The follow code
    File folder=new File("Z:"+File.separator+"sharefolder");//Z is a net share driver
    File[] files=folder.listFiles();
    System.out.println("test");
    System.out.println("length="+files.length);
    will throw exception at the second print.
    but it works well in main funtion.
    Is anybody know what is the problem.
    JSP works on windows2003 server,tomcat 5.0.28 JDK1.4 net share folder on windows2000 server

    no error code for this.But when I start tomcat I get the follow error.
    java.lang.IllegalArgumentException: Document base Z:\ does not exist or is not a readable directory
         at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:138)
         at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:3910)
         at org.apache.catalina.core.StandardContext.start(StandardContext.java:4138)
         at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:823)
         at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
         at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
         at org.apache.catalina.core.StandardHostDeployer.addChild(StandardHostDeployer.java:903)
         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.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:216)
         at org.apache.commons.digester.SetNextRule.end(SetNextRule.java:256)
         at org.apache.commons.digester.Rule.end(Rule.java:276)
         at org.apache.commons.digester.Digester.endElement(Digester.java:1058)
         at org.apache.catalina.util.CatalinaDigester.endElement(CatalinaDigester.java:76)
         at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
         at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
         at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
         at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
         at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
         at org.apache.commons.digester.Digester.parse(Digester.java:1567)
         at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:488)
         at org.apache.catalina.core.StandardHost.install(StandardHost.java:863)
         at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:483)
         at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:427)
         at org.apache.catalina.startup.HostConfig.start(HostConfig.java:983)
         at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:349)
         at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091)
         at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
         at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
         at org.apache.catalina.core.StandardService.start(StandardService.java:480)
         at org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)
         at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
         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.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)
    Jun 5, 2006 6:55:41 PM org.apache.catalina.core.StandardContext start
    SEVERE: Error in resourceStart()
    Jun 5, 2006 6:55:41 PM org.apache.catalina.core.StandardContext start
    SEVERE: Error getConfigured
    Jun 5, 2006 6:55:41 PM org.apache.catalina.core.StandardContext start
    SEVERE: Context startup failed due to previous errors
    Jun 5, 2006 6:55:41 PM org.apache.catalina.core.StandardContext start
    SEVERE: Exception during cleanup after start failed
    LifecycleException: Container StandardContext[msgstore] has not been started
         at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4466)
         at org.apache.catalina.core.StandardContext.start(StandardContext.java:4371)
         at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:823)
         at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
         at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
         at org.apache.catalina.core.StandardHostDeployer.addChild(StandardHostDeployer.java:903)
         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.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:216)
         at org.apache.commons.digester.SetNextRule.end(SetNextRule.java:256)
         at org.apache.commons.digester.Rule.end(Rule.java:276)
         at org.apache.commons.digester.Digester.endElement(Digester.java:1058)
         at org.apache.catalina.util.CatalinaDigester.endElement(CatalinaDigester.java:76)
         at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
         at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
         at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
         at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
         at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
         at org.apache.commons.digester.Digester.parse(Digester.java:1567)
         at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:488)
         at org.apache.catalina.core.StandardHost.install(StandardHost.java:863)
         at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:483)
         at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:427)
         at org.apache.catalina.startup.HostConfig.start(HostConfig.java:983)
         at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:349)
         at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091)
         at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
         at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
         at org.apache.catalina.core.StandardService.start(StandardService.java:480)
         at org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)
         at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
         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.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)

  • Problem with database schema objects in the entity object wizard

    Hi All,
    When creating a new entity object, I am facing a problem with database schema objects in the entity object wizard, database schema objects (check boxes for tables,synonyms...) are disabled. Actually I am using a synonym but I am not able to select the synonym check box.
    Can any of you folks tell me how to enable the database schema objects (check boxes for tables,synonyms...).
    Thanks in Advance.
    Raja.M

    Make sure your using rite version of jdeveloper..
    Make sure your using apps schema and check whether your able perform DML operations in the schema vis sql developer.
    --Prasanna                                                                                                                                                                                                                                                                                                                                                                           

  • OAS 10.1.2.0.2 - How configure PHP with database access

    I Installed OAS 10.1.2.0.2 on SuSe 9.3.
    I put in $ORACLE_HOME/Apache/Apache/htdocs a php pages for test if this OAS versión supported php.
    The test is ok, this versión support PHP, but not are configured to PHP with database access.
    My question is: How I configure this OAS 10.1.2.0.2 to use PHP with database access?
    I need install all PHP although my php pages is running (without database access) ??? or I only need configure database access?

    How I compile my PHP with --with-oci8??                                                                                                                                                                                                                           

  • Problem with database connectivity

    Hi guys,
    I'm having a problem with database connectivity . I'm using the mySQL database & org.gjt.mm.mysql driver.
    I've kept the org folder under the directory where the Database.java program is residing .
    My program is as follows:
    import java.sql.*;
    public class Database
         Connection con;
         public void connect()
              System.out.println("In connect.");
         public Connection connectDB(String username,String password,String database)
              try
                   Class.forName("org.gjt.mm.mysql.jdbc.Driver");
                   String url="jdbc:mysql:"+database;
                   con=DriverManager.getConnection(url,username,password);
              catch(SQLException e)
                   System.out.println("SQL Exception caught:"+e);     
              catch(Exception e)
                   System.out.println("Exception e caught:"+e);     
              return con;
         public static void main(String args[])
              try
              Connection c;
              Database db=new Database();
              c=db.connectDB("root","","//192.168.0.2/squid");
              System.out.println("Connection created.");
              c.close();
              catch(Exception e)
                   System.out.println("Exception caught:"+e);     
    It gets compiled but gives the following error when run.
    Exception e caught:java.lang.ClassNotFoundException: org.gjt.mm.mysql.jdbc.Driver
    Connection created.
    Exception caught:java.lang.NullPointerException
    I don't know why the class is not found.Pl . help me rectify my mistake.Is there any other path to be set?
    Thanks.

    You need to run it with the JDBC driver in the classpath
    java -classpath .;[mySqlJdbcDriver.jar] Database

  • Strange problem with Database LInk

    Hi Everyone,
    I have strange problem with Database Link in Oracle 11g Express Edition;
    There are two computers: computer-server and computer-client. Tnsnames.ora are the same on both computers ie.
    CT =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = krzysztof)(PORT = 1521))
    (CONNECT_DATA = (SERVICE_NAME = XE)
    I created database link :
    Create database link zdalny
    Connect to <user_id> identified by <password>
    using ‘CT’;
    Client can’t connect with server when I am using above command. But when I change “using” for using ‘krzysztof:1521’ or using ‘krzysztof’ or using ‘server IP:1521’ – everything is ok.
    Why I am asking. Because in all materials which I am reading about Oracle command with using ‘CT’ should be working correct. But there is not. Do you know, why?
    Thanks in advance and apologize for my English.
    Rgds
    Krzysztof

    Krzysztof Szymaniak wrote:
    Thanks for all replies.
    Below is server's tnsnames.ora
    CT =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = krzysztof)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = XE)
    EXTPROC_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
    (CONNECT_DATA =
    (SID = PLSExtProc)
    (PRESENTATION = RO)
    ORACLR_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
    (CONNECT_DATA =
    (SID = CLRExtProc)
    (PRESENTATION = RO)
    SQL Error: ORA-12154: TNS:could not resolve the connect identifier specified
    12154. 00000 - "TNS:could not resolve the connect identifier specifie
    Rgds
    Krzysztof
    PS. I tried with using 'XE' - not working.Assuming that is the correct tnsnames, of course XE is not working. You don't have a tnsnames entry for 'XE'.
    You need to be aware that when using a dblink, the client is the db in which the link is defined, not the desktop from which you connect to that database.
    I think you need to start here:
    http://edstevensdba.wordpress.com/2011/02/26/ora-12154tns-03505/
    http://edstevensdba.wordpress.com/2011/02/09/sqlnet_overview/ (Help! I can’t connect to my database )
    http://edstevensdba.wordpress.com/2011/02/16/sqlnet_client_cfg/ (Help! I can’t connect to my database (part duex) )
    The fact that your client (db link) is a database doesn't change anything taught in the above.

  • Problem with Dynamically accessing EJB Class objects in WL 7.0 SP1

    I am trying to build a component which has the ability to instantiate and execute
    an known EJB method on the fly.
    I have managed to build the component but when I try and execute it I get a ClassNotFoundException.
    I know that the EJB I am trying to invoke is deployed and available on the server,
    as I can see it in the console, I also seen to have been able to get the remote
    interface of the object, my problem occurs when I try and access the class object
    so I can perform a create on the object and then execute my method
    The code I have written is below:
    private Object getRemoteObject(Context pCtx, String pJNDIName, String pHomeBean)
    throws Exception {
         String homeCreate = "create";
         Class []homeCreateParam = { };
         Object []homeCreateParamValues = {};           
    try {  
    //This call seems to work and doesn't throw an exception     
    Object home = pCtx.lookup(pJNDIName);
    //However this call throws a java.lang.ClassNotFoundException
    Class homeBean = Class.forName(pHomeBean);
    Method homeCreateMethod = homeBean.getMethod(homeCreate,homeCreateParam);
    return homeCreateMethod.invoke(home, homeCreateParamValues);
    } catch (NamingException ne) {             
    logStandardErrorMessage("The client was unable to lookup the EJBHome.
    Please make sure ");
    logStandardErrorMessage("that you have deployed the ejb with the JNDI
    name "+pJNDIName+" on the WebLogic server ");
    throw ne;
    } catch (Exception e) {
    logStandardErrorMessage(e.toString());
    throw e;     
    Any advice would be really appreciated, I'm fast running out of ideas, I suspect
    it has something to do with the class loader but I'm not sure how to resolve it
    Regards
    Jo Corless

    Hello Joanne,
    Congratulations! I'm very happy that you've managed to fix your problem. It's
    always essential to understand how to package applications when deploying on BEA
    WebLogic. Usually, by throwing everything into an EAR file solves just about all
    the class loader problems. :-) Let us know if you have any further problems that
    we can assist you with.
    Best regards,
    Ryan LeCompte
    [email protected]
    http://www.louisiana.edu/~rml7669
    "Joanne Corless" <[email protected]> wrote:
    >
    >
    I've fixed it!!!!!!!!
    Thanks to everyone who gave me help!!!!
    The class loader was the culprit which is what I suspected all along.
    As soon
    as I put the 2 jar files I was using into an EAR file the problem went
    away!!!!!
    Thanks again
    Jo Corless
    "Ryan LeCompte" <[email protected]> wrote:
    Hello Joanne,
    As Mr. Woollen mentioned, I also believe it's a problem with the class
    loader.
    You need to be careful how you arrange your EJBs, because WebLogic has
    a specific
    method in which it loads classes in an EAR, JAR, and WAR file(s). Please
    refer
    to http://dev2dev.bea.com/articles/musser.jsp for more information about
    BEA WebLogic
    class loading mechanisms and caveats. Also, try printing out the various
    methods
    that are available on the object that was returned to you via reflection.
    For
    example, use the getMethods() method, which returns an array of Method
    objects
    that you can subsequently cycle through and print out the various method
    names.
    This way you can discover if the class found/returned to you is indeed
    the one
    you intend to locate.
    Hope this helps,
    Ryan LeCompte
    [email protected]
    http://www.louisiana.edu/~rml7669
    Rob Woollen <[email protected]> wrote:
    I believe the issue is the home interface class for this EJB is not
    available in the class loader which is doing the reflection.
    If you do:
    getClass().getClassLoader().loadClass(homeInterfaceClassName)
    I suspect it will fail. Reflection still requires that the class be
    loadable.
    -- Rob
    Joanne Corless wrote:
    Hi Slava,
    If I make my code look like you describe below I get a compliationerror telling
    me that
    home.getMethod() is not recognised (no such method)
    If I change it slightly and use
    Method homeCreateMethod =
    home.getClass().getMethod(homeCreate,homeCreateParam);
    The code will compile OK but when executed it still throws a NoSuchMethodException
    Any ideas ?
    Thanks for your help so far
    Regards
    Jo Corless
    Your code should look like
    Object home = pCtx.lookup(pJNDIName);
    Method homeCreateMethod =
    home.getMethod(homeCreate,homeCreateParam);
    return homeCreateMethod.invoke(home, homeCreateParamValues);
    Regards,
    Slava Imeshev
    "Joanne Corless" <[email protected]> wrote in message
    news:[email protected]...
    Hi Ryan,
    I also wanted to mention that if you do a "header search" in this
    particular
    newsgroup
    with the search query as "reflection", you will see many previousmessages
    regarding
    reflection and EJBs. I believe you could learn a lot from thedifficulties
    that
    others have faced and solved.I tried that and although there was a number of similar cases noneof them
    actually
    seem to fix my issue. Thanks for the suggestion though
    Are the EJBs that you are trying to access accessible via your
    system
    classpath?
    Try to avoid having them accessible via the main system classpath,and
    only bundle
    them in your appropriate EJB jar files (contained in an EAR file,for
    example).Maybe I should have laid the problem out a little clearer.
    I have a number of EJB's bundled up in a JAR file which is hot deployedto
    the
    server. Within this first JAR file is an EJB (SSB) component that
    needs
    to
    be
    able to invoke a known method on another EJB. This second EJB may
    or
    may
    not be
    within the first JAR file but it also will be hot deployed.
    The component trying to invoke the method on the 2nd EJB has to
    be
    able to
    create
    an instance of the 2nd EJB without actually knowing anything bar
    a
    JNDI
    Name which
    is passed in at runtime.
    I can get as far as doing the
    Object home = pCtx.lookup(pJNDIName);
    This returned a class with the name
    "com.csc.edc.projects.allders.httppostoffice.postman.PostmanBean_mp8qy2_Home
    Impl_WLStub"
    My problem seems to occur when I try and invoke the create method
    Method homeCreate = home.getClass().getMethod("create", new Class[0]);
    My code throws a java.lang.NoSuchMethodException at this point so
    I
    am
    unable
    to progress to the next step of :
    Object bean = homeCreate.invoke(home, null);
    So I can return the instantiated bean back to the calling client.
    Why am I getting the NoSuchMethodException, is is because I am gettinga
    stub
    back rather than the home interface and if so how do I get the truehome
    interface
    from the bean
    Thanks in advance
    Jo Corless

  • Problem with MS Access Files and executable files migrateds

    Hi all.
    We are migrating an old Netware 6.0 server to new SLES 10 SP3 with OES 2 SP2a. I already migrated one volume and in this weekend well migrate the last, and most important, volume to new OES 2 server.
    The problem is about some MS Access databases that are very very used for all users and some executable applications that was writed using fisical path like \\OLDSERVER\VOL\PATH\APP.EXE or some links to libraries, databases, images, etc.
    The old NW 6.0 server will be removed from the tree in 2 or 3 weeks and in this time the two servers will co-exists. I want to know if it is possible redirect NCP requests to OLDSERVER to NEWSERVER without users rewrite all of MS Access and executable applications. Is it possible?
    Tks
    Alan Cota.

    AlanCota wrote:
    >
    > Hi all.
    >
    > We are migrating an old Netware 6.0 server to new SLES 10 SP3 with OES
    > 2 SP2a. I already migrated one volume and in this weekend we´ll migrate
    > the last, and most important, volume to new OES 2 server.
    >
    > The problem is about some MS Access databases that are very very used
    > for all users and some executable applications that was writed using
    > fisical path like \\OLDSERVER\VOL\PATH\APP.EXE or some links to
    > libraries, databases, images, etc.
    >
    > The old NW 6.0 server will be removed from the tree in 2 or 3 weeks and
    > in this time the two servers will co-exists. I want to know if it is
    > possible redirect NCP requests to OLDSERVER to NEWSERVER without users
    > rewrite all of MS Access and executable applications. Is it possible?
    >
    > Tks
    >
    > Alan Cota.
    >
    >
    Have you considered trying to use a dns alias to it. I have not tested with
    MS access specifically but many other apps it works perfectly for. This is
    how I get around those issues. Of course your issue is that you still
    havethe existing server in the tree. How much will there still be on the
    old server. You could rename the old nw server and than update its info in
    dns to resolve this.

  • Problem with database in dreamweaver 8

    Hi,
    I am workting with Dreamweaver 8 and WAMP5 1.4.5 (php 5.1
    Apache 1.3 MySQL 4.1)
    I have created a connexion MySQL in Dreamweaver 8
    When I open "database" in the application panel I can see the
    4 tables of my database but when I click on each table to see the
    fields it doen't show any and indicate there is no field.
    THANKS in advance for you HELP

    Let's start at the top. What is your Operating System? What
    do you see
    when you point your browser at ''
    http://localhost''?
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "Springbok_yfc" <[email protected]> wrote in
    message
    news:ectqni$3cg$[email protected]..
    > Hi there
    >
    > No too long ago I purchased Dreamweaver 8 and I am
    currently designing a
    > website for an organisation but I am having diffculties
    setting up the
    > Access
    > Database..I have no problem with connecting Dreamweaver
    8 to the database.
    > So
    > in order to get a solution to my difficulties I have
    been doing alot of
    > tutorials that I got from online, but for some reason
    after I have done
    > everything the tutorials asked of me and its time to
    preview the live
    > data..a
    > pop up message appears saying the Page cannot be
    displayed. Is this a
    > glitch
    > within Dreamweaver 8 itself? And if so will the updates
    be able to fix
    > this
    > problems? What I would really like to do is store news
    etc...in a database
    > and
    > then have the database shown on the website as a news
    archive. Can anyone
    > please help me with this?
    >
    > Kind Regards
    > Heinrich
    >

  • Problem with database-Studio

    Hello
    We use MaxDB for our SAP Systems and for our own applications(none SAP)
    We upgradet our none-SAP Database from 7.7 to 7.8.02.21.
    Then we tried the new Database Studio.
    With problems!?
    We have a schema BWALLE and a user BWPROGI.
    When connecting to the database with SQL-Studio as BWPROGI we can see the schema BWALLE and all our tables.
    When connecting to the database with Database Studio as BWPROGI we can't see the schema BWALLE and we can't see our tables??!!
    We see 2 users BWPROGI and DBABW(the administrator).
    Under BWPROGI there are no schemas!??
    Under DBABW there are schemas(dbabw,domain,sysinfo) and all the tables/views belonging to these schemas.
    What do we miss???
    Why can we access our tables/views/indexes with SQL-Studio and not with Database-Studio.
    Any help welcomed
    Regards
    Albert
    Edited by: Albert Beermann on Nov 23, 2011 10:45 AM
    Some more informations:
    We have a group BWALLE nouser BWALLE.
    The owner of the Schema BWALLE is the group.
    The user BWPROGI is member of the Group BWALLE.
    When connecting with SQL Studio as BWPROGI we see the schema BWALLE and all tables in the schema.
    When connecting with MAXDB Maestro as BWPROGI we see the schema BWALLE and all tables.
    When connecting with Database Studio as BWPROGI we can't  see the schema BWALLE and don't see any table.
    Connecting with SQL-Studio as BWPROGI shows the tables in schema BWALLE and we can read,update,... the data,
    but with MAXDB 7.8 we get an error when doubleclicking on a table to look at the table structure.
    With MAXDB Maestro everything works as expected.
    Regards
    Albert

    Hello
    How to do this???
    Alter user BWPROGI DBA??
    BWPROGI is member of group BWALLE and for group members i can only set mode resource or standard!
    Or do you mean something else?
    Regards
    Albert

  • Problem with Restrict Access to Page with access level using ASP

    I'm using Dreamweaver CS3 with ASP-VBScript and an Access
    database. The pages were created from scratch for this project,
    using those tools all the way through.
    I've created a login page, an admin homepage, and add, edit,
    and list records pages for three tables. The login page uses the
    Server Behavior "Log in User", all other pages use the Server
    Behavior "Restrict Access to Page". All of these are based on an
    Access Level.
    Login seems to work correctly, and redirects to the admin
    homepage. From the admin homepage, I can open any other page as
    expected, and they initially display correctly. On the add and edit
    pages, however,
    submitting the form often results in getting logged out, but
    not always.
    Once this happens, I can log back in, but other problems will
    sometimes occur during that second login session. Sometimes,
    logouts will occur on pages that worked fine during the first login
    session. Sometimes, another session variable that I've setup
    manually will change when it shouldn't...as if there were two
    values stored for my session variable, and reloading the page
    changes to the other value.
    This
    post seems closest to my experience, but it doesn't look like
    there was really an answer beyond "I had to fight with it for a bit
    to get it to work":
    I suspected that there is some problem with session settings
    on the server. We have an almost identical tool on the same server
    that was developed with an older version of DW that works more
    reliably; it sometimes has problems with the initial login, but
    never has a problem after that.
    Has anyone experienced problems like this? Any suggestions
    for what to check? I'm really pulling my hair out since it's so
    unreliable...the kind of problem that goes away when you try to
    show someone and comes back when they leave.

    Hello,
    I was thinking that all I would need would be the username, although username and paswsword would be more secure.  There are about 50 users and no groups or levels.  They are all equal ... same level.
    The website is private and there is a general content area for all users and then there will be private areas for each user where proprietary documents will be held.  I need to be able to ensure that user 'A' can only see the user 'A' pages, user 'B' can only see user 'B', etc.
    I don't really understand what the Dreamweaver script is doing, but the overview sounded like it was the right tool to accomplish what I'm trying to do.
    Any assistance greatly appreciated.
    thanks.

  • Problem with Database Control

    Hi @all
    OS Windows Server 2008 (Standard)
    DB 11.1.0.7.0
    I try to configure DB Control manually with
    D:\ORACLE\product\11.1.0\db_1\BIN>emca -config dbcontrol db -repos create
    result is
    15.09.2009 13:19:14 oracle.sysman.emcp.EMConfig perform
    INFO: Dieser Vorgang wird in D:\ORACLE\cfgtoollogs\emca\SAXMBS\emca_2009_09_15_1
    3_15_52.log protokolliert.
    15.09.2009 13:19:15 oracle.sysman.emcp.util.FileUtil backupFile
    WARNUNG: Datei D:\ORACLE\product\11.1.0\db_1\sysman\config\emd.properties konnte
    nicht gesichert werden
    15.09.2009 13:19:15 oracle.sysman.emcp.util.FileUtil backupFile
    WARNUNG: Datei D:\ORACLE\product\11.1.0\db_1\sysman\config\emoms.properties.emca
    konnte nicht gesichert werden
    15.09.2009 13:19:15 oracle.sysman.emcp.util.FileUtil backupFile
    WARNUNG: Datei D:\ORACLE\product\11.1.0\db_1\sysman\emd\targets.xml konnte nicht
    gesichert werden
    15.09.2009 13:19:15 oracle.sysman.emcp.util.DBControlUtil stopOMS
    INFO: Database Control wird gestoppt (dies kann etwas lõnger dauern) ...
    15.09.2009 13:19:15 oracle.sysman.emcp.EMReposConfig createRepository
    INFO: Das EM-Repository wird erstellt (dies kann etwas lõnger dauern)...
    15.09.2009 13:24:22 oracle.sysman.emcp.EMReposConfig invoke
    INFO: Repository erfolgreich erstellt
    15.09.2009 13:24:23 oracle.sysman.emcp.EMReposConfig uploadConfigDataToRepositor
    y
    INFO: Konfigurationsdaten werden in das EM-Repository hochgeladen (dies kann etw
    as lõnger dauern) ...
    15.09.2009 13:25:02 oracle.sysman.emcp.EMReposConfig invoke
    INFO: Konfigurationsdaten wurden erfolgreich hochgeladen
    15.09.2009 13:25:02 oracle.sysman.emcp.EMConfig perform
    SCHWERWIEGEND: Fehler beim Aktualisieren von D:\ORACLE\product\11.1.0\db_1\sysma
    n\config\emoms.properties
    Weitere Einzelheiten finden Sie in der Log-Datei in D:\ORACLE\cfgtoollogs\emca\S
    AXMBS\emca_2009_09_15_13_15_52.log.
    Die Konfiguration konnte nicht abgeschlossen werden. Weitere Einzelheiten finden
    Sie in der Log-Datei in D:\ORACLE\cfgtoollogs\emca\SAXMBS\emca_2009_09_15_13_15
    _52.log.
    snippet of the log
    at oracle.sysman.emcp.EMConfigAssistant.main(EMConfigAssistant.java:468)
    Caused by: java.io.FileNotFoundException: D:\ORACLE\product\11.1.0\db_1\sysman\config\emoms.properties (Zugriff verweigert)
         at java.io.FileOutputStream.open(Native Method)
         at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
         at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
         at oracle.sysman.emcp.util.FileUtil._copyFile(FileUtil.java:257)
         ... 11 more
    15.09.2009 13:25:02 oracle.sysman.emcp.EMDBCConfig updateEmomsProps
    KONFIG: Datei D:\ORACLE\product\11.1.0\db_1\sysman\config\emoms.properties.emca wird in D:\ORACLE\product\11.1.0\db_1\sysman\config\emoms.properties kopiert
    15.09.2009 13:25:02 oracle.sysman.emcp.EMConfig perform
    SCHWERWIEGEND: Fehler beim Aktualisieren von D:\ORACLE\product\11.1.0\db_1\sysman\config\emoms.properties
    Weitere Einzelheiten finden Sie in der Log-Datei in D:\ORACLE\cfgtoollogs\emca\SAXMBS\emca_2009_09_15_13_15_52.log.
    15.09.2009 13:25:02 oracle.sysman.emcp.EMConfig perform
    KONFIG: Stack Trace:
    oracle.sysman.emcp.exception.EMConfigException: Fehler beim Aktualisieren von D:\ORACLE\product\11.1.0\db_1\sysman\config\emoms.properties
         at oracle.sysman.emcp.EMDBCConfig.performConfiguration(EMDBCConfig.java:405)
         at oracle.sysman.emcp.EMDBCConfig.invoke(EMDBCConfig.java:167)
         at oracle.sysman.emcp.EMDBCConfig.invoke(EMDBCConfig.java:137)
         at oracle.sysman.emcp.EMConfig.perform(EMConfig.java:223)
         at oracle.sysman.emcp.EMConfigAssistant.invokeEMCA(EMConfigAssistant.java:535)
         at oracle.sysman.emcp.EMConfigAssistant.performConfiguration(EMConfigAssistant.java:1215)
         at oracle.sysman.emcp.EMConfigAssistant.statusMain(EMConfigAssistant.java:519)
         at oracle.sysman.emcp.EMConfigAssistant.main(EMConfigAssistant.java:468)
    the problem is Caused by: java.io.FileNotFoundException: D:\ORACLE\product\11.1.0\db_1\sysman\config\emoms.properties (access denied)
    and when i try to deconfig this following occured
    15.09.2009 13:30:28 oracle.sysman.emcp.EMConfig perform
    INFO: Dieser Vorgang wird in D:\ORACLE\cfgtoollogs\emca\SAXMBS\emca_2009_09_15_1
    3_29_13.log protokolliert.
    15.09.2009 13:30:28 oracle.sysman.emcp.util.DBControlUtil stopOMS
    INFO: Database Control wird gestoppt (dies kann etwas lõnger dauern) ...
    15.09.2009 13:30:28 oracle.sysman.emcp.EMConfig perform
    SCHWERWIEGEND: Can't find file D:\ORACLE\product\11.1.0\db_1\host\sysman\config\emoms.properties
    Weitere Einzelheiten finden Sie in der Log-Datei in D:\ORACLE\cfgtoollogs\emca\S
    AXMBS\emca_2009_09_15_13_29_13.log.
    Die Konfiguration konnte nicht abgeschlossen werden. Weitere Einzelheiten finden
    Sie in der Log-Datei in D:\ORACLE\cfgtoollogs\emca\SAXMBS\emca_2009_09_15_13_29
    _13.log.
    Can't find file D:\ORACLE\product\11.1.0\db_1\host_db\sysman\config\emoms.properties
    With Windows Server 2003 I haven't any problems with the configuration of database control over cmd.
    Any Ideas?

    Please run the following command
    cmd>net start OracleDBConsolexxx(Assume sid name=xxx
    cmd>set oracle_sid=xxx
    cmd>emca (You will get all related keyword of emca)
    Firstly you have to check that if you have created your database through DBCA then you have to drop old repository or recreate repository:
    To drop (remove) the configuration files and repository for Database Console, run:
    cmd>emca -deconfig dbcontrol db -repos drop
    To recreate (remove & create) the configuration files and repository for Database Console, run:
    cmd>emca -config dbcontrol db -repos recreate
    (Please mark it helpful/Answered if you get solution)
    Regards,
    Suman

Maybe you are looking for

  • Is this phone work in Egypt

    Hi, i want to ask if the *iphone* is working in egypt (cairo)or not. one friend of my friend told me that it will begin working from January 2008, is it right. what is the address of Apple company in cairo (Egypt) and the phone number if it is possib

  • Unable to access USB hard drive connected to EA3500 router

    WD essential 2GB hard drive connects OK through cisco connect but when I click on the shortcut or try to access the drive I get access denied duer to permission to the ip address

  • What happened to Prey Invasion?

    I was looking into different games for the iPhone, and I came across Prey Invasion. This game came out in June of 2009, yet it doesn't exist on the App Store any longer. Does anyone know what happened to it?

  • Why is XDCAM HD rendering so slow?

    XDCAM HD 1080i60 VBR rendering is terribly slow. I'm using an 8-core Mac Pro with 8gb of RAM, a 3x750GB internal RAID 0, and the Radeon X1900 that comes with the machine. XDCAM HD rendering is taking about 4x realtime to export using QT conversion. B

  • How to install KDE without an internet connection

    I have a fast internet connection at the office, but not at home. 1. What files do I need to copy so that I can burn a KDE CD? 2. What is the procedure to install KDE from my own CD? Thank you. wickyd