Applet + EJB (jBoss) - Error to get an EJB from Applet

Hello? All
Could anybody explain why i get an error here. There are an Applet, which should get an access to EJB which was deployed on JBOSS Server (version 4.2.2.GA). If I run this code as a Desktop Application (Make a window and put my panel here) - all OK. But if I run my Code as an Applet from HTML page I get an Exception like this:
java.lang.IllegalStateException: unread block data
I refer to my EJB this way:
public void init()
try
Properties jndiProps = new Properties();
String myServer = "michhome";
jndiProps.setProperty("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory") ;
jndiProps.setProperty("java.naming.provider.url", myServer) ;
jndiProps.setProperty("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces") ;
InitialContext ctx = new InitialContext(jndiProps);
// Error got here:
Object homeSource = ctx.lookup("Data1EJB");
Data1Home home = (Data1Home)PortableRemoteObject.narrow(homeSource, Data1Home.class) ;
RemoteBean1 = home.create() ;
catch (Exception e)
PrintException(e);
Fragment of my HTML page where I put an Applet:
<applet code=J2EEApplClientPKG.MainApplet codebase=classes ARCHIVE = "jbossall-client.jar" width=600 height=300>
</applet>
Thank you for time you spend on this question.

Hello, my first applet is in the jar, and I want to
get it out.get it out you mean launch from an applet which would be
applet code=AppletClassName.class
archive="JarFileName.jar"
width=width height=height>
</applet>
or unjar it out which would be
jar -xvf JarFileName.jar
There is no plug-in installed here either, so I want
THE LATEST VERSION to be uploaded from sun
automatically.
My book suggested something like the code below, but
the plug-in version must be an oldie.
Please help!
<code>
<!--archive="napaku.jar"-->
<object
classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
width="307"
height="231"
codebase="http://java.sun.com/products/plugin/1.2/jinst
ll-12-win32.cab#Version=1,2,0,0">
<param name="code" value="Lottery.class" />
<param name="type" archive="napaku.jar" />
<comment>
<embed type="application/x-java-applet;version=1.2"
code="Lottery.class"
width="307"
height="231"
pluginspace="http://java.sun.com/products/plugin/1.2/pl
gin-install.html">
<noembed>
</comment>
"Napaku applet fails to load!
</noembed>
</embed>
</object>
</code>codebase="http://java.sun.com/products/plugin/1.3/jinstall-13-win32.cab#Version=1,3,0,0">
The version may not be latest but you could change that as per your req.

Similar Messages

  • Error in Getting Database Connection from datasource

    Hi,
    I am getting the following error when I tried to get the connection from the datasource object.
    The call is made by the client proxy and the code is getting executed on the server side.
       InitialContext ic = new InitialContext();
       DataSource ods = (DataSource)ic.lookup(dataSourceJndiName);
                conn = ods.getConnection();
    ods.getConnection() is giving the following error
    Caused by: com.sap.engine.services.dbpool.exceptions.BaseSQLException: ResourceException occured in method ConnectionFactoryImpl.getConnection(): com.sap.engine.services.connector.exceptions.BaseResourceException: Not allowed to open connection!
         at com.sap.engine.services.dbpool.cci.ConnectionFactoryImpl.getConnection(ConnectionFactoryImpl.java:59)
         at com.delos.cmx.server.datalayer.DataSourceConnectionData.getDatabaseConnection(DataSourceConnectionData.java:132)
         ... 37 more
    Caused by: com.sap.engine.services.connector.exceptions.BaseResourceException: Not allowed to open connection!
         at com.sap.engine.services.connector.resource.impl.RestrictedResourceSetImpl.getSharedEventHandler(RestrictedResourceSetImpl.java:64)
         at com.sap.engine.services.connector.jca.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:172)
         at com.sap.engine.services.dbpool.cci.ConnectionFactoryImpl.getConnection(ConnectionFactoryImpl.java:51)
         ... 38 more
         at com.sap.engine.services.ejb.exceptions.BaseRuntimeException.writeReplace(BaseRuntimeException.java:273)
         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:324)
         at java.io.ObjectStreamClass.invokeWriteReplace(ObjectStreamClass.java:896)
         at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1011)
         at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)
         at com.sap.engine.services.rmi_p4.DispatchImpl.throwException(DispatchImpl.java:120)
         at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:270)
         at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:165)
         at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:102)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:37)
         at com.sap.engine.core.cluster.impl6.session.UnorderedChannel$MessageRunner.run(UnorderedChannel.java:71)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:94)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:140)
    I am unable to proceed because of this error.
    I would appreciate any help on this.
    Thanks
    Kavitha

    Hi Kavitha,
    If u have not gone through the link given below then
    plz visit it, it may help u.
    http://help.sap.com/saphelp_nw04/helpdata/en/5c/2f2c4142aef623e10000000a155106/content.htm
    Regards,
    Narinder

  • Have a error in getting the values from database randomly

    Hi to all
    I am new member to this community and new to java programming, i am the one of them who got benefited through this site , with that hope i am asking u to clear my doubt.
    Actually i want to get the data from database randomly, i dont have problem either in database connection and generating random number,its working fine. but when i have to get the data from database with generated random no using absolute function , i am getting an exception
    eg : rs.absolute(2);
    i could not move to the second row of my result set.
    not only absolute function whatever the function i am using except next method, getting exception.
    my code :
    package practical;
    import java.util.*;
    import java.sql.*;
    public class gen {
         Connection con;
         Statement s;
         ResultSet rs;
         public void get(int t)
              try
                   rs.absolute(t);
                   String question=rs.getString("question");
                   System.out.println("Random question : "+question);
              catch(Exception e)
                   System.out.println("get error");
         public void ran()
              Random r=new Random();
                   for(int i=0;i<10;i++)
                        int j=r.nextInt(10);
                        System.out.println("random value : "+j);
                        if(j!=0)
                             try
                                  get(j);
                             catch(Exception e)
                                  System.out.println("ran error");
         public void connect()
              try
                   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                   con=DriverManager.getConnection("jdbc:odbc:ds","sa","server");
                   s=con.createStatement();
                   rs=s.executeQuery("select question from qa");
                   ran();
                   con.close();
              catch(Exception e)
                   System.out.println("error");
         public static void main(String... strins)
              new gen().connect();
    }

    but i acheived through the code which is pasted below but i have to close the database connection for every iteration.
    package practical;
    import java.util.*;
    import java.sql.*;
    public class gen {
         Connection con;
         Statement s;
         ResultSet rs;
         public void get(int t)
              int c=0;
              while(c!=t)
                   try
                   rs.next();
                   c++;
                   catch(Exception e)
                        System.out.println("next error");
              if(c==t)
              {     try
                        String question=rs.getString("question");
                        System.out.println("Random question : "+question);
                   catch(Exception e)
                        System.out.println("iteration error");
         public void ran()
              Random r=new Random();
                   int j=r.nextInt(10);
                   System.out.println("random value : "+j);
                   if(j!=0)
                        try
                             get(j);
                        catch(Exception e)
                             System.out.println("ran error");
         public void connect()
              try
                   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                   con=DriverManager.getConnection("jdbc:odbc:ds","sa","server");
                   s=con.createStatement();
                   rs=s.executeQuery("select question from qa");
                   ran();
                   con.close();
              catch(Exception e)
                   System.out.println("error");
         public static void main(String... strins)
              for(int i=0;i<10;i++)
                   new gen().connect();
    }

  • Error in getting Keystore Manager from SAPSecurityResources Class

    Dear Experts,
    I am currently exploring using AS keystore in SAP PI 7.1 and encountered an error complaining that the service com.sap.aii.af.svc was not found when I tried getting the KeyStoreManager from SAPSecurityResources with the following code:
            SAPSecurityResources sapSecRes = SAPSecurityResources.getInstance();
            KeyStoreManager storeMngr = sapSecRes.getKeyStoreManager(PermissionMode.SYSTEM_LEVEL, new String[] { "<PROTECTION_DOMAIN>" });
    I have already included the reference for com.sap.aii.af.svc.facade in the deployment descriptors but i still get the following error:
            +An exception is encountered, couldn't instantiate the com.sap.aii.security.lib.KeyStoreManager. Message: +
            +AccessControlException in Method: checkPermission( String[] ). The adapter framework service domain stack: +
            service:com.sap.aii.af.svc was NOT found.
    Any help is greatly appreciated. Thanks in advance.

    Hello Joe
    Apply the latest available XIAF patches for the your current SP release and this should resolve this error. A fix was released for this error in XI ADAPTER FRAMEWORK 7.10 SAPXIAF06P patch #7 (SP-level #06) 
    Regards
    Mark

  • Error while getting the NotificationTemplate from NotificationService

    Hi all
    iam intrested in getting NotificationTemplate object using the NotificationService class' api using below code
       NotificationTemplate objtemplate =objNotificationService.lookupTemplate(templateName.trim(),enLocale);when i execute the above code iam getting the exception
    <Incoming message header or abbreviation processing failed
    java.io.InvalidClassException: org.eclipse.persistence.internal.helper.DatabaseTable; local class incompatible: stream classdesc serialVersionUID = -3104383536215490874, local class serialVersionUID = -8219935847209476671
    java.io.InvalidClassException: org.eclipse.persistence.internal.helper.DatabaseTable; local class incompatible: stream classdesc serialVersionUID = -3104383536215490874, local class serialVersionUID = -8219935847209476671I searched this on forums i found that it is due to different versions of the eclipselink.jar so i added the eclipselink.jar in my JDevloper's class path and also added same jar in the
    my Jdevloper's weblogic path C:\jdevweblogic11g\oracle_common\modules\oracle.toplink_11.1.1
    Still iam getting the the above exception.
    please suggest me some solution.

    Hi all
    when i run my below code as a standalone java application the code will execute fine..
    NotificationService objNotificationService =  client.getService(NotificationService.class);
    NotificationTemplate objtemplate =objNotificationService.lookupTemplate(templateName.trim(),enLocale);but when i execute the above mentioned code as a web application using ADF, JDEvloper 11.1.1.4 and weblogic server it will give me error below.
    <Jul 13, 2011 10:13:52 AM IST> <Error> <RJVM> <BEA-000503> <Incoming message header or abbreviation processing failed
    java.io.InvalidClassException: org.eclipse.persistence.internal.helper.DatabaseTable; local class incompatible: stream classdesc serialVersionUID = -3104383536215490874, local class serialVersionUID = -8219935847209476671
    java.io.InvalidClassException: org.eclipse.persistence.internal.helper.DatabaseTable; local class incompatible: stream classdesc serialVersionUID = -3104383536215490874, local class serialVersionUID = -8219935847209476671
         at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:562)
         at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1583)
         at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1496)
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1316)
         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
         Truncated. see log file for complete stacktrace
    >
    The exception ; ; nested exception is:
         java.rmi.UnmarshalException: Incoming message header or abbreviation processing failed ; nested exception is:
         java.io.InvalidClassException: org.eclipse.persistence.internal.helper.DatabaseTable; local class incompatible: stream classdesc serialVersionUID = -3104383536215490874, local class serialVersionUID = -8219935847209476671; nested exception is: java.rmi.UnmarshalException: Incoming message header or abbreviation processing failed ; nested exception is:
         java.io.InvalidClassException: org.eclipse.persistence.internal.helper.DatabaseTable; local class incompatible: stream classdesc serialVersionUID = -3104383536215490874, local class serialVersionUID = -8219935847209476671
    javax.ejb.EJBException: ; nested exception is: so i replace all the refrencence of eclipcselink.jar file in my weblogic enviornment with the same version which iam using.
    still iam getting that same exception mentioned above.
    so please provide me some pointers to above problem.how we can tell weblogic server to load test. jar file insted of other version of test.jar
    Thanks and Regards.
    Edited by: Bipin Patil on Jul 12, 2011 11:42 PM

  • Getting error while getting ACK back from TP

    Hi,
    When my TP is sending ack back to me I am getting following error -
    2008.12.24 at 11:06:19:672: Thread-10: B2B - (DEBUG) oracle.tip.adapter.b2b.tpa.RepoDataAccessor:getDocumentDefinition() given docTypeName: Pip3A4PurchaseOrderRequest given docTypeRev: V02.00
    2008.12.24 at 11:06:19:674: Thread-10: B2B - (DEBUG) oracle.tip.adapter.b2b.tpa.RepoDataAccessor:getDocumentDefinition() given docTypeName: Pip3A4PurchaseOrderRequest given docTypeRev: V02.00
    2008.12.24 at 11:06:19:674: Thread-10: B2B - (DEBUG) oracle.tip.adapter.b2b.tpa.RepoDataAccessor:getDocumentDefinition() reposDocTypeName: Pip3A4PurchaseOrderRequest reposDocTypeRev : V02.03.00
    2008.12.24 at 11:06:19:674: Thread-10: B2B - (DEBUG) oracle.tip.adapter.b2b.tpa.RepoDataAccessor:getDocumentDefinition() reposDocTypeName: Pip3A4PurchaseOrderConfirmation reposDocTypeRev : V02.03.00
    2008.12.24 at 11:06:19:675: Thread-10: B2B - (DEBUG) oracle.tip.adapter.b2b.tpa.RepoDataAccessor:getAgreementData() End..
    2008.12.24 at 11:06:19:675: Thread-10: B2B - (DEBUG) oracle.tip.adapter.b2b.tpa.RepoDataAccessor:getAgreementDetails() ..End
    2008.12.24 at 11:06:19:675: Thread-10: B2B - (DEBUG) oracle.tip.adapter.b2b.tpa.MessageModifier:updateDeliveryChannel() Updating DeliveryChannel information..
    2008.12.24 at 11:06:19:675: Thread-10: B2B - (DEBUG) oracle.tip.adapter.b2b.tpa.MessageValidator:validateCollaborationInfo()
    2008.12.24 at 11:06:19:676: Thread-10: B2B - (ERROR) Error -: AIP-50515: Collaboration revision "V02.03.00" in message is different from collaboration revision "V02.00" in agreement
    at oracle.tip.adapter.b2b.tpa.MessageValidator.validateCollabInfo(MessageValidator.java:298)
    at oracle.tip.adapter.b2b.tpa.MessageValidator.validateMessage(MessageValidator.java:123)
    at oracle.tip.adapter.b2b.tpa.TPAProcessor.processTPA(TPAProcessor.java:664)
    at oracle.tip.adapter.b2b.tpa.TPAProcessor.processIncomingTPA(TPAProcessor.java:196)
    at oracle.tip.adapter.b2b.engine.Engine.processIncomingMessage(Engine.java:1810)
    at oracle.tip.adapter.b2b.engine.Engine.incomingContinueProcess(Engine.java:2554)
    at oracle.tip.adapter.b2b.engine.Engine.handleMessageEvent(Engine.java:2424)
    at oracle.tip.adapter.b2b.engine.Engine.processEvents(Engine.java:2379)
    at oracle.tip.adapter.b2b.data.MsgListener.onMessage(MsgListener.java:527)
    at oracle.tip.adapter.b2b.data.MsgListener.run(MsgListener.java:374)
    at java.lang.Thread.run(Thread.java:534)
    2008.12.24 at 11:06:19:677: Thread-10: B2B - (DEBUG) oracle.tip.adapter.b2b.engine.Engine:XXX: processIncomingMessage B2BDE
    2008.12.24 at 11:06:19:677: Thread-10: B2B - (DEBUG) oracle.tip.adapter.b2b.engine.Engine:handleExceptionBeforeIncomingTPA Enter
    2008.12.24 at 11:06:19:677: Thread-10: B2B - (DEBUG) oracle.tip.adapter.b2b.engine.Engine:XXX: handleInboundException
    Our Trading Partner is using BizTalk B2B and we are using RosettaNet V02.00 as document exchange protocol. PIP Version we are using is V02.03.00
    Please help.
    Thanks & Regards,
    Anuj Dwivedi

    Hi Ramesh,
    Thanks for your prompt response.
    I am using the Document Type Pip3A4PurchaseOrderConfirmation with revision v02.03.00
    But still we are getting the same error. My trading partner is sending an Exception to us in Service Conent. Actually he is sending messages in four parts-
    =====
    Preamble
    Delivery Header
    Service Header
    Service Contents
    ======
    In which part he should provide the required properties(docTypeName and docTypeRivision) to find the right Collaboration by Oracle B2B at our side?
    Thanks.
    Warm Regards,
    Anuj Dwivedi

  • Error in getting the report from web

    HI,
    HERE I AM TRYING TO CREATE A REPORT FROM FORMS WHICH I WANT TO WEBENABLED.
    I COULD GO TILL I CAN SEE MY FORM WHERE I GIVE AS THE PARAMETERS AS 'HS' OR 'SC' OR 'YS' THROUGH THE LIST OF VALUES OR THE USER CAN JUST ENTER IF THEY KNOW THE VALUE WHICH THEY ARE LOOKING FOR.
    HERE WHEN I CLICK ON THE BUTTON TO GET THE REPORT ITS GIVING AN ERROR CALLED FRM-41219 CANNOT FIND THE REPORT: INVALID ID.
    I DONT UNDERSTAND WHERE I AM DOING WRONG THE REPORT IS ON THE SERVER ALSO.
    HERE IS THE CODE IN WHEN-BUTTON-PRESSED TRIGGER TO GET THE REPORT.
    declare
    v_rep varchar2(100);
    repid report_object;
    v_param varchar2(1024);
    begin
    repid:=find_report_object('WAT');
    v_param:='paramform=no P_STATUS='||:NBT.STATUS||'';
    set_report_object_property(repid,report_other,v_param);
    set_report_object_property(repid,report_destype,file);
    set_report_object_property(repid,report_desname,'E:\ORANT\WEBTEMP\TEST'||:NBT.STATUS ||'.pdf');
    v_rep:=run_report_object(repid);
    web.show_document('http://PS/WEBTEMP/TEST'||:NBT.STATUS||'.pdf','_blank');
    end;
    HERE 'WAT' IS THE REPORT NAME AND P_STATUS IS THE PARAMETER I AM PASSING FROM THE REPORT,
    :NBT.STATUS IS THE PARAMETER WHERE I GIVE IN THE FORM SUCH AS 'CS' OR 'YS' ETC..
    I CAN SEE THE FORM BUT AFTER I GIVE THE PARAMETER AND CLICK ON THE BUTTON TO GET THE REPORT I AM GETTING THE ERROR.
    PLEASE DO HELP ME OUT.
    THANKS A LOT IN ADVANCE....

    Hello,
    In
    repid:=find_report_object('WAT');
    WAT should be the report object seen in the forms object navigator and not actully the report rdf name.
    This message FRM-41219 essentially means that the report cannot be found. Specifying the correct name of a report object found in the forms object navigator (not the
    actual name of the rdf file) usually resolves the problem.
    Please ensure to be on the latest patch of your version ( can get from oracle metalink site) of developer to consume any fixes in this area
    Thanks
    The Oracle Reports Team

  • Error in getting xml output from Apps

    I have developer 10g. Whatever report (rdf) I create I face exactly the same problem. I register the report (rdf) in Apps and select xml format as the output. But when I run it to get the xml file, I get the following error
    The XML page cannot be displayed
    Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.
    A semi colon character was expected. Error processing resource 'http://XXXX.XXXX.XXX.XXX:8000/OA_CGI/FNDWRR.exe?temp_id=3547...
    <?xml version="1.0" encoding="&Encoding"?>
    ---------------------------------------^If I use Reports 6i to create exactly the same report (rdf) everything works fine (i.e I get the xml file when I run it).
    What is the issue with 10g?

    If you have & or any other special characters like < ,>
    & lt;      <      less than
    & gt;      >      greater than
    & amp;      &      ampersand
    & apos;      '      apostrophe
    & quot;      "      quotation mark
    these , have to replaced by the equivalent in the sql queries. to get like & lt; , & gt; ,
    because these are pre-defined in XML , so the xml will error out , if you any of these characters in the xml element value.

  • Error while getting a Connection from a  Datasource

    hi all, m using netbeans to design a web app. it got to the point of connecting to a mysql database, i tried to follow the recommendation of using a datasource instead, and i edited the META-INF\context.xml and
    WEB-INF\web.xml as follows respectively.
    Here is a copy of context.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <Context path="/MyOnlineStore">
    <Resource name="jdbc/StoreDB"
    type="javax.sql.DataSource"
    auth="Container"
    />
    <ResourceParams name="jdbc/StoreDB">
    <parameter>
    <name>username</name>
    <value>root</value>
    </parameter>
    <parameter>
    <name>password</name>
    <value>stephanie</value>
    </parameter>
    <parameter>
    <name>driverClassName</name>
    <value>com.mysql.jdbc.Driver</value>
    </parameter>
    <parameter>
    <name>url</name>
    <value>jdbc:mysql://localhost:3306/mystore?autoReconnect=true</value>
    </parameter>
    </ResourceParams>
    </Context>
    and here is a copy of web.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
    <servlet>
    <servlet-name>controller</servlet-name>
    <servlet-class>com.obinna.servlets.ControllerServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>controller</servlet-name>
    <url-pattern>*.do</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>controller</servlet-name>
    <url-pattern>/controller</url-pattern>
    </servlet-mapping>
    <session-config>
    <session-timeout>
    30
    </session-timeout>
    </session-config>
    <welcome-file-list>
    <welcome-file>controller</welcome-file>
    </welcome-file-list>
    <resource-ref>
    <res-ref-name>jdbc/StoreDB</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    </web-app>
    and here is a fragment of a helper class i use to retrieve connections
    public class StoreJDBCHelper {
    private DataSource _dataSource;
    public StoreJDBCHelper() throws NamingException
    Context context = new InitialContext();
    Context applicationEnv = (Context)context.lookup("java:comp/env");
    _dataSource = (DataSource)applicationEnv.lookup("jdbc/StoreDB");
    public Connection getConnection() throws SQLException
    return _dataSource.getConnection();
    each time i call getConnection() from another class i get this exception
    org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class ' ' for connect URL 'null'
    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1150)
    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
    at com.obinna.processingcommands.StoreJDBCHelper.getConnection(StoreJDBCHelper.java:33)
    at com.obinna.processingcommands.CategoryProcessingCommand.getCategoryDB(CategoryProcessingCommand.java:85)
    at com.obinna.processingcommands.CategoryProcessingCommand.getOrCreateCategory(CategoryProcessingCommand.java:58)
    at com.obinna.processingcommands.CategoryProcessingCommand.execute(CategoryProcessingCommand.java:47)
    at com.obinna.servlets.ControllerServlet.processRequest(ControllerServlet.java:63)
    at com.obinna.servlets.ControllerServlet.doPost(ControllerServlet.java:90)
    at com.obinna.servlets.ControllerServlet.doGet(ControllerServlet.java:78)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
    at java.lang.Thread.run(Thread.java:619)
    Caused by: java.lang.NullPointerException
    at sun.jdbc.odbc.JdbcOdbcDriver.getProtocol(JdbcOdbcDriver.java:507)
    at sun.jdbc.odbc.JdbcOdbcDriver.knownURL(JdbcOdbcDriver.java:476)
    at sun.jdbc.odbc.JdbcOdbcDriver.acceptsURL(JdbcOdbcDriver.java:307)
    at java.sql.DriverManager.getDriver(DriverManager.java:253)
    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1143)
    ... 25 more
    please what can i do.
    thanks.

    Caused by: java.lang.NullPointerException
    at sun.jdbc.odbc.JdbcOdbcDriver.getProtocol(JdbcOdbcDriver.java:507)
    at sun.jdbc.odbc.JdbcOdbcDriver.knownURL(JdbcOdbcDriver.java:476)
    at sun.jdbc.odbc.JdbcOdbcDriver.acceptsURL(JdbcOdbcDriver.java:307)
    at java.sql.DriverManager.getDriver(DriverManager.java:253)
    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1143)
    ... 25 moreDBCP is trying to create a datasource for you. It has the MySQL JDBC URL which you specified (jdbc:mysql://localhost:3306/mystore?autoReconnect=true) and is trying to find a matching driver. It scans all drivers which are loaded and registered in the DriverManager. The JDBC-ODBC bridge driver is apparently also loaded somehow and while testing the MySQL URL on this driver, the driver is throwing a NullPointerException while getting the protocol.
    This look like one more bug in the JDBC-ODBC bridge -which is already soo full of unfixed bugs-. So to get this problem solved either remove the JDBC-ODBC bridge driver from your application, or upgrade it to a newer version without this bug (if any exist), or change the Tomcat resource configuration that no one datasource is actually using the JDBC-ODBC bridge driver, so that this driver won't get loaded and registered by the DriverManager.

  • Error in getting a date from DateField

    Hi,
    I am using a DateField on a form. Initially it has been to set to the current date. But if the user makes changes and selects a new date, I need to save this new date. I use dt = date.getDate() to get the util date and then convert it to string using toString() method. But instead it returns me some hexdecimal number.Can anybody please reply what is the problem.

    I think you better save the date as a long.
    /* getting time as long (represents milliseconds since January 1, 1970, 00:00:00 GMT */
    long lngDate = date.getDate().getTime();To retrieve the Date you simply create a new Date object...
    /* retrieve Date from time */
    Date date = new Date(lngDate);or you use the setTime(long time) method of the Date class.

  • Error while getting shipment cost from inbound delivery

    Hi all, I already make the setting according to sapnote 427944.
    I made PO with condition type FRB1 and value 0.
    Then we made the inbound delivery and shipment documents
    next while we makin shipment cost using VI01 the net value field is grey and the value is 0.
    can anyone please explain to me how can i get the value for the shipment cost? Thanks

    Hi
    On double clicking on the item level, respective item details of the material is displayed and then click SHIFT+ F6 to see the COSTCENTER in the shipement cost document.
    Configuration:
    1) In Item category configuration account assigment category is Cost Center.
    Logistics Execution>Transportation>Shipment Costs>Shipment Cost Document>Shipment Cost Types and Item Categories-->Define item categories
    2) In the Transaction code OKB9 Costcenter is assigned to the company code , in order to automate the determination of CO assignments in case of Shipment cost document creation
    Logistics Execution>Transportation>Shipment Costs>Settlement>Automatic Determination of CO Assignments
    Edited by: Bhaskar C.R on Jun 17, 2010 10:13 AM

  • OpenScript & ant ssh - "Cannot get a connection from helper after 120 seconds"

    Hi, I'm trying to run openscript tests (with runscript.bat file) from hudson. I'm connecting to windows XP machine through ssh and executing batch file, but execution of scipt finishes with error "Cannot get a connection from helper after 120 seconds". This error occurs when openscript tries to run test on Internet Explorer. If IE is not nescessary, test finishes with OK. When running batch directly on windows (without hudson and ssh, but on the same user) everything works fine. Has enyone met with such issue ?

    Hi,
    What Jules has suggested should work, but I have also used the following to get scripts working from OTM -
    OATS Application service - run as a user with local admin rights
    helper service - local system
    OATS agent service - set to manual
    Then, run the agent service as a console app -
    1. run a cmd prompt
    2. Run c:\> C:\OracleATS\agentmanager\bin\AgentManagerService.exe -c C:\OracleATS\agentmanager\bin\\AgentManagerService.conf
    3. Execute the script from OTM
    If the agent is running on a machine separate to OTM then the user will have to remain logged in.
    Cheers,
    Jamie

  • OTM-Cannot get a connection from helper after 120 seconds.

    Can any one tell me how to fix the problem of ,
    OTM not able to run the scripts, and getting the following error:
    "Cannot get a connection from helper after 120 seconds. "
    I have tried un-installing and installing all the services , actually its happening for helper service,but at the same time
    Its working when we use OpenScript, with out any such helper issue but when we use to run the same script using OTM , the above mentioned error message is getting displayed.
    Please let me know a solution, if any one has made a fix for this.
    Thanks in Advance
    Atish

    Hi,
    Step1: Uninstall ATS products and Oracle XE database
    Step2: Remove/Rename the following folders.
    Remove/Rename ATS install directory (e.g. C:\OracleATS).
    Remove/Rename the directory: C:\Documents and Settings\username\osworkspace (depends on your Operating System, it may look like: C:\Users\username\osworkspace)
    Remove/Rename the directory: C:\Program Files\Oracle\Inventory ( depends on your Operating System, it may look like: C:\Program Files (x86)\Oracle\Inventory)
    C:\Windows\rsw.ini
    Step3: Remove the following Services (if services exist)
    Start -> Run. Enter "cmd" Type the command: sc delete servicename
    Oracle Application Testing Suite Application Service
    Step4: Remove the Registry Keys (if exist)
    Start -> Run. Enter "regedit" to launch Registry Editor. Remove the keys below:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Oracle Application Testing Suite Application Services
    HKEY_LOCAL_MACHINE\Software\Oracle\Oracle Application Testing Suite and Oracle Test Management
    Step5: Restart your System
    Step6: Install ATS with admin privilege
    Regards,
    Deepu M

  • Error while running EJB from java client on JBOSS

    Hi
    As i am new to EJB i have created a helloworld application in ejb which is working fine when i try to call it from servlet but when i try to invoke the same ejb from java client (i.e from diff jvm) on jboss i got the following error:
    javax.naming.CommunicationException: Could not obtain connection to any of these urls: localhost:1099 and discovery failed with error: javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out] [Root exception is javax.naming.CommunicationException: Failed to connect to server localhost:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused]]]
         at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1399)
         at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:579)
         at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:572)
         at javax.naming.InitialContext.lookup(InitialContext.java:351)
         at com.gl.TestClient.main(TestClient.java:39)
    Caused by: javax.naming.CommunicationException: Failed to connect to server localhost:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused]]
         at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:254)
         at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1370)
         ... 4 more
    Caused by: javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused]
         at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:228)
         ... 5 more
    Caused by: java.net.ConnectException: Connection refused
         at java.net.PlainSocketImpl.socketConnect(Native Method)
         at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
         at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
         at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
         at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
         at java.net.Socket.connect(Socket.java:519)
         at java.net.Socket.connect(Socket.java:469)
         at java.net.Socket.<init>(Socket.java:366)
         at java.net.Socket.<init>(Socket.java:266)
         at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:69)
         at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:62)
         at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:224)
         ... 5 more
    Following is my code:
    Home Interface:
    package com.gl;
    import javax.ejb.CreateException;
    public interface testHome extends EJBHome {
         String JNDI_NAME = "testBean";
         public     test create()
         throws java.rmi.RemoteException,CreateException;
    Remote Interface:
    package com.gl;
    import java.rmi.RemoteException;
    import javax.ejb.EJBObject;
    public interface test extends EJBObject {
         public String welcomeMessage() throws RemoteException;
    Bean:
    package com.gl;
    import java.rmi.RemoteException;
    import javax.ejb.EJBException;
    import javax.ejb.SessionBean;
    import javax.ejb.SessionContext;
    public class testbean implements SessionBean {
         public void ejbActivate() throws EJBException, RemoteException {
              // TODO Auto-generated method stub
         public void ejbPassivate() throws EJBException, RemoteException {
              // TODO Auto-generated method stub
         public void ejbRemove() throws EJBException, RemoteException {
              // TODO Auto-generated method stub
         public void setSessionContext(SessionContext arg0) throws EJBException,
                   RemoteException {
              // TODO Auto-generated method stub
         public void ejbCreate(){}
         public String welcomeMessage(){
              return "Welcome to the World of EJB";
    ejb-jar.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
    <ejb-jar>
    <enterprise-beans>
    <session>
    <ejb-name>testBean</ejb-name>
    <home>com.gl.testHome</home>
    <remote>com.gl.test</remote>
    <ejb-class>com.gl.testbean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    </session>
    </enterprise-beans>
    </ejb-jar>
    jboss.xml:
    <?xml version='1.0' ?>
    <!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS 3.2//EN" "http://www.jboss.org/j2ee/dtd/jboss_3_2.dtd">
    <jboss>
    <enterprise-beans>
    <entity>
    <ejb-name>testBean</ejb-name>
    <jndi-name>testBean</jndi-name>
    </entity>
    </enterprise-beans>
    </jboss>
    Client code:
    package com.gl;
    import java.util.Properties;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.rmi.PortableRemoteObject;
    public class TestClient {
         public static void main(String[] args) throws Exception{
                   try{
                   /*     Properties props=new Properties();
                        props.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
                        props.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
                        props.put(Context.PROVIDER_URL, "jnp://localhost:1099");
                   Properties props = new Properties();
    props.put(Context.INITIAL_CONTEXT_FACTORY,
    "org.jnp.interfaces.NamingContextFactory");
    props.put(Context.PROVIDER_URL, "localhost:1099");
                        System.out.println("Properties ok");
                        //env.setProperty(Context.INITIAL_CONTEXT_FACTORY,"org.jboss.naming.HttpNamingContextFactory");
                        //env.put(Context.PROVIDER_URL,"http://localhost:8080");
                        //env.put(Context.SECURITY_PRINCIPAL, "");
                        //env.put(Context.SECURITY_CREDENTIALS, "");
                        Context ctx=new InitialContext(props);
                        System.out.println("context ok");
                        //testHome home = (testHome)ctx.lookup("testBean");
                        Object obj = ctx.lookup ("testBean");
                        System.out.println("ojb = " + obj);
                        testHome ejbHome = (testHome)PortableRemoteObject.narrow(obj,testHome.class);
                   test ejbObject = ejbHome.create();
                   String message = ejbObject.welcomeMessage();
                        System.out.println("home ok");
                        System.out.println("remote ok");
                        System.out.println(message);
                        catch(Exception e){e.printStackTrace();}
    I am able to successfully deployed my ejb on JBOSS but i m getting above error when i am trying to invoke ejb from java client.
    kindly suggest me something to solve this issue.
    Regards
    Gagan
    Edited by: Gagan2914 on Aug 26, 2008 3:28 AM

    Is it a remote lookup? Then maybe this will help:
    [http://wiki.jboss.org/wiki/JBoss42FAQ]
    - Roy

  • Calling EJB from an applet in 9iAS Release 2?

    Hello!
    In 9iAS Release 1 it is not so easy to call an EJB from an applet. First the applet needs special privileges and then the applet starts only once. The cause of problem is the implementation of ormi.
    Will 9iAS Rel. 2 support Applets calling EJBs?

    Jeff,
    I am also trying to make an applet client for an EJB deployed to OC4J.
    I modified the java2.policy file as you suggested, but when I tried to run my applet, I
    got the following error:
    java.lang.ExceptionInInitializerError: java.security.AccessControlException: access denied (java.util.PropertyPermission tunneling.shortcut read)
         at java.security.AccessControlContext.checkPermission(Unknown Source)
         at java.security.AccessController.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkPropertyAccess(Unknown Source)
         at java.lang.System.getProperty(Unknown Source)
         at java.lang.Boolean.getBoolean(Unknown Source)
         at com.evermind.server.rmi.RMIInitialContextFactory.<clinit>(RMIInitialContextFactory.java:34)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Unknown Source)
         at com.sun.naming.internal.VersionHelper12.loadClass(Unknown Source)
         at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
         at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
         at javax.naming.InitialContext.init(Unknown Source)
         at javax.naming.InitialContext.<init>(Unknown Source)
         at its.fnd.ejb.EJBHomeFinder.getHomeObject(Unknown Source)
         at its.fnd.flight.ejb.EJBFlightFactory.<init>(Unknown Source)
         at its.fnd.flight.FlightFactory.<init>(FlightFactory.java:97)
         at EJBApplet.jbInit(EJBApplet.java:47)
         at EJBApplet.init(EJBApplet.java:36)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    I am using OC4J (stand-alone) version 9.0.2.0.0 on Solaris 7 and Microsoft Internet Explorer
    5.0 with the java 1.3.1 plug-in.
    Here is the applet code that I use to lookup the EJB home interface:
    Properties props = new Properties();
    props.put(Context.INITIAL_CONTEXT_FACTORY,"com.evermind.server.rmi.RMIInitialContextFactory");
    props.put(Context.PROVIDER_URL,"ormi://host:6666/app");
    props.put(Context.SECURITY_PRINCIPAL,"admin");
    props.put(Context.SECURITY_CREDENTIALS,"password");
    Context ctxt = new InitialContext(props);
    Object homeObj = ctxt.lookup("my_bean");
    MyBeanHome home = PortableRemoteObject.narrow(homeObj, MyBeanHome.class);
    The HTML page with the <applet> tag is a static HTML page that is part of OC4J's default
    web application. The applet class file is located in a subdirectory of the default-web-app
    directory. Here is the HTML page...
    <HTML>
    <HEAD>
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252">
    <TITLE>
    HTML Test Page
    </TITLE>
    </HEAD>
    <BODY>
    <object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" width="580" height="450" name="EJBApplet" align="middle" alt="Loading EJBApplet ...">
    <param name="java_code" value="EJBApplet">
    <param name="java_codebase" value="/tests">
    <param name="java_archive" value="xerces.jar,ejb.jar,oc4j.jar,jaas.jar"/>
    <param name="java_type" value="application/x-java-applet;version=1.3">
    <param name="java_scriptable" value="true">
    <table cellpadding="1" bgcolor="#FFFFFF" width="580" height="450">
    <tr><td>
    This is a place for an APPLET.<br>Your browser doesn't support the correct applet java plug-in.<br><br>You can install the correct plug-in from here.<br><a target='_blank' onClick='javascript:self.window.close()' href="/classes/3rdparty/j2re-win-plug-in.exe">Click here to install plug-in.</a><br><br>Or if you have an Internet connection you can install the correct plug-in from here.<br><a target='_blank' onClick='javascript:self.window.close()' href="http://java.sun.com/products/plugin/1.3/plugin-install.html">Click here to install plug-in from Internet.</a><br><br>You can call your System Administrator for assistance.</td></tr>
    </table>
    </object>
    </BODY>
    </HTML>
    I have searched the Internet, and the documentation, and tried several, different things,
    but I can't get it to work.
    Any and all help will be greatly appreciated.
    Thanks,
    Sofia.

Maybe you are looking for

  • Problems opening a PDF in Acro Reader 8 with BuddyAPI?

    I apologize in advance for not having enough information to properly diagnosis this situation, I'm encountering considerable resistance from others in my company to go back to the client and ask for additional details, but here's the situation: We've

  • How to create fillable PDF with dynamic content dropdowns?

    I'm creating a March Madness bracket for people that don't really understand how they work.  What I'd like to do is have dropdowns for each of bracket lines (they would list the teams playing against each other for that game and they would select who

  • How to annotate non-persistence fields?

    Hi, I am using TopLink Essentials as my JPA provider. I have few objects where I don't have a mapping of fields on the object to the database columns. Basically I would like to use few fields in the object to create some behaviour and doesn't want to

  • Changing Bridge back to Browser

    How do I change the Browser under file to give me the Browser under Photoshop 7.0 instead of Bridge in PS CS3? I need the functions that the Browser of PS 7.0 provides. I'm using Window XP SP2 Roy

  • How do I uninstall Flash Player 11.7 and reinstall 11.6?

    My Smilebox creation will not play the music when I installed Flashplayer 11.7. I want to uninstall 11.7 and reinstall 11.6. Everytime I try 11.7 will not uninstall.