JSP and CMP EJB 2.0

          Hi there,
          I having a problem every time I try to EJBHome.create( ...) a new
          CMP EJB 2.0 via a JavaBean
          called from an JSP or directly from the JSP.
          However, I successfully can retrieved EJBHome.findByPrimaryKey("myKey")
          from both the
          JavaBean and JSP.
          Could you help me figure out why .create does not work ?
          Here is the exceptions chain :
          weblogic.utils.AssertionError: *****
          ASSERTION FAILED *****[ Unexpected IOException
          marshalling on server-side ] at
          weblogic.rmi.internal.OutboundServerResponse.sendThrowable(OutboundServerResponse.java:63)
          at weblogic.rmi.internal.BasicServerAdapter.handleThrowable(BasicServerAdapter.java:477)
          at
          weblogic.rmi.internal.BasicServerAdapter.postInvoke(BasicServerAdapter.java:449)
          at
          weblogic.rmi.internal.BasicRequestHandler.handleRequest(BasicRequestHandler.java:122)
          at
          weblogic.rmi.internal.BasicRequestDispatcher.dispatch(BasicRequestDispatcher.java:115)
          at
          weblogic.rmi.internal.ServerRequest.sendOneWayRaw(ServerRequest.java:88)
          at
          weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:108)
          at
          weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:247)
          at
          weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:225)
          < ... my
          source file specified here ...>
          at jsp_servlet._jsp._user._results._jspService(_results.java:182)
          at
          weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
          at
          weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:213)
          at
          weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:246)
          at
          weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:1265)
          at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:1622)
          at
          weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
          at
          weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
          <Mar 22, 2001 5:50:03 PM JST>
          <Error> <AdapterDispatcher> <Error
          in Dispatcher
          Thank you, rivisa
          

Sorry but I have forgotten to precise that I have also developped a EJB CMP 1.1 where the bean class is not abstract and I have the same error when the JSP page calls this EJB
(for the EJB CMP 2.0 the bean class is declared abstract)

Similar Messages

  • JSP AND EJB

    how to deploy EJB with JSP?
    can any body tell me how to connect JSP with EJB while deploying?
    I am using J2EE system application PE server8.0
    Thanks in advance

    ejb will be deployed in ejb container & jsp will be deployed in servlet container. i guess, your question is specific to as how to do it using deployment scripts. Or are you trying to deploy using Administration control of PE server. I have worked on IBM Websphere 5.0. My explanation is more from Websphere point of view, please check if it makes sense to you.
    ejb .jar file (which contains ejb classes) is considered as a ejb module by app server & web .war file (which contains servlets, jsps) is considered as a web module by app server. A seperate class-loader for each module can be set using administration console (it can also be done in deployment scripts, but i dont know how part of it). Dependent classes for ejb module are specified in manifest.mf of ejb project. and dependent ejb jar files for web project have to copied in "Web Content\Web INF\lib" folder of web project. Then JSPs can find the ejb classes.
    Thanks.
    Madhav

  • JSP and EJB in 8i

    Hi
    This is not really a JDBC question but this board appears to be
    the best fit.
    I am interested in hearing your experience with using EJBs on
    Oracle 8i. In particular, is it possible to use a JSP to access
    EJBs?
    Thanks
    Pratul
    null

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by DAVOR BORCIC ([email protected]):
    Can anyone tell me where I can find Oracle JSP 1.1, mentioned in "Oracle 8i, Java Component Programming with EJB, CORBA and JSP" book?
    The Oracle JSP release available on Technet is 1.0.
    Oracle JSP 1.1 is, according to book, prerequisite for an installation on Tomcat.
    Please advise.
    <HR></BLOCKQUOTE>
    Oracle iAS

  • HANDLING CHECKBOXES USING JSP AND EJB

    HI SDN MEMBERS,I AM LEARNING HOW TO CODE IN J2EE.I DISPLAY A FORM WITH CHECKBOXES AND SOME ITEMS BY THE SIDES.NOW THESE ITEMS CAME FROM THE DATABASE BUT ON DISPLAY THE USER SHLD CHECK HIS CHOICE CHECKBOXES THEN SUBMIT.PLS HOW DO I GO ABOUT THIS?

    You need to put the checkboxes and submit button in a <form> tag.
    However, I suggest you read a book on JSP (or read a free comprehensive on-line tutorial) since there is a lot to learn that having a few questions answered in these forums can't begin to cover.
    Also, why are you using EJB? That's an advanced topic and I suggest you use something simpler such as JSP and servlets.

  • Where should the support classes of servlets, JSPs and EJBs be placed

              Hi
              Could you please tell me where the support classes (simple
              java classes) used by servlets, JSPs and EJBs should be placed.
              I find that my application does not work if I place all the
              support classes of a servlet under $MYSERVER/clientclasses. I need to place some in $MYSERVER/clientclasses and some in
              $MYSERVER/servletclasses. But I figured this out my trial and error and I could not find any logical explanation why some of them should go into $MYSERVER/clientclasses and others into
              $MYSERVER/servletclasses.
              Thanks
              Regards
              Pratima
              

    you can put 'em in weblogic classpath
              Kumar
              Pratima Nambiar wrote:
              > Hi
              > Could you please tell me where the support classes (simple
              > java classes) used by servlets, JSPs and EJBs should be placed.
              > I find that my application does not work if I place all the
              > support classes of a servlet under $MYSERVER/clientclasses. I need to place some in $MYSERVER/clientclasses and some in
              > $MYSERVER/servletclasses. But I figured this out my trial and error and I could not find any logical explanation why some of them should go into $MYSERVER/clientclasses and others into
              > $MYSERVER/servletclasses.
              >
              > Thanks
              > Regards
              > Pratima
              

  • Online materials for learning Javascript, JSP and EJB

    I am a core java programmer, not aware of J2EE stuffs. Please let me know the best online resources for learning Javascript, JSP and EJB
    Thanks,
    Gautam

    http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/EJBConcepts3.html
    http://otn.oracle.com/sample_code/tech/java/codesnippet/j2ee/ejbbestpractices/ejb-best.html#pattern
    http://java.sun.com/webservices/docs/1.0/tutorial/doc/JSPIntro.html
    http://java.sun.com/j2ee/1.4/docs/tutorial/doc/index.html
    http://home.cogeco.ca/~ve3ll/jstutor5.htm
    http://www.pageresource.com/jscript/j_a_02.htm
    I think will do

  • Want to run servlets, jsp and ejb

    Hi there, I have just installed Oracle9iAS on my PC and want to check how to use OAS with servlets, JSPs and ejbs, so can any one tell me where can I find some worked examples and step by step deployment process, any help would be appreciated, regards, Shabbier

    If you have installed Oracle9iAS, you should be able to get to the welcome page at
    http://<machine_name>:7778/
    You can see J2EE demos off that page.
    Also, you can find info about oracle9iAS and documentation
    at http://otn.oracle.com/products/ias/content.html
    OC4J info can be found at
    http://otn.oracle.com/tech/java/oc4j
    -Prasad

  • Adding more fields to a CMP EJB

    I'm using Sun's ONE studio 5, Sun ONE AS, and PointBase-db.
    I use the CMP EJB wizard to generate the skeleton for a CMP EJB, and specify to use a database-table from PointBase as the CMP-persistant fields.
    The problem arises when i want to add futher fields, when i try adding the in the IDE, i cant deploy the application(!)
    What am i doing wrong?
    Thank you in advance!

    Please see response to
    http://forum.java.sun.com/thread.jsp?forum=136&thread=444274&start=0&range=15#2191688
    vbk

  • Question: How to use XMLType in a CMP EJB???

    Hello, Together,
    I have a big problem using XMLType in a CMP EJB. I don't know, if somebody knows about it:
    I am trying to write a CMP EJB, which should be deployed under JBoss later. The problem here is, which java data type should I use to map a column of XMLType. I have tried to use it as a java.lang.Object, and also as a java.lang.String, it did not work properly.
    Can someone help me? Thanks a lot!

    Just pass the in the JSP/Servlet involved ServletContext through as a method or constructor parameter of that Java class.
    Semi-pseudo:protected doPost(req, res) {
        ServletContext servletContext = getServletContext();
        SomeJavaClass someJavaClass = new SomeJavaClass(servletContext);
        // or
        someJavaClass.doSomething(servletContext);
    }

  • Tree View through JSP and Java Script

    Hi,
    I am looking for code or ideas of a Tree Structure as shown in in the left side frame of admin console of Sun App server 7 on the browser. I need to create a tree structure which will work on the browser like it works on the Sun App Server 7 admin console. If you had any idea or code, please share with me. I would like to have some idea before I start building it. The tree will be build from the database. So any database design is also helpful. I am planning to have that tree using JSP and EJB.
    Please help. If you are not clear what I am looking for, then please drop a line in this forum, so that I can explain it fine.
    Thanks in advance.
    Amit

    You can use the JSP Tree Tag I have developed. This helps you both structuring the tree model itself + it takes care of displaying the tree in a nice way. You can change all HTML code used to display the tree. Also you can build trees dynamically instead of just displaying static trees. Take a look at it here:
    http://www.jenkov.dk/projects/treetag/treetag.jsp
    Kind Regards,
    Jakob Jenkov

  • Running CMP EJB in remote OC4J fails, works in embedded. Oracle 9i

    I more or less followed the EJB Tutorial (in the help) for creating a session-entity bean facade from Oracle 9i tables. Everything executes correctly in the embedded oc4j but it fails on the remote oc4j with
    java.sql.SQLException: Invalid column name
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:187)
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:229)
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:292)
         at oracle.jdbc.driver.OracleStatement.get_column_index(OracleStatement.java:5632)
         at oracle.jdbc.driver.OracleResultSetImpl.findColumn(OracleResultSetImpl.java:716)
         at oracle.jdbc.driver.OracleResultSet.getString(OracleResultSet.java:1506)
         at com.evermind.sql.FilterResultSet.getString(FilterResultSet.java:585)
         at EmployeeLocalHome_EntityHomeWrapper13.findAll(EmployeeLocalHome_EntityHomeWrapper13.java:1260)
    Then I also created another simpler CMP EJB that just has 3 fields from Oracle table. This one doesn't even work in embedded oc4j :
    com.evermind.server.rmi.OrionRemoteException: Database error: ORA-01747: invalid user.table.column, table.column, or column specification
         java.util.Collection TimesheetHoursHome_EntityHomeWrapper11.findAll()
    Are there any known problems I should look out for with generating CMP EJBS with wizards?
    I think the IDE is more intuitive than WSAD. It would be great it things worked though.
    Another question is regarding relationships. Do the wizards always use ejb-refs to implement relationships? It should be easy enough to add them with EJB Editor if they do not.
    Thanks for any help.

    Known issues are documented in the release notes
    http://otn.oracle.com/products/jdev/htdocs/readme_903Preview.html#ejb
    <<<Another question is regarding relationships. Do the wizards always use ejb-refs to implement relationships? >>>>
    Not sure what you meant here. If you reverse engineer let us say DEPT and EMP tables, foreign key relationships between the tables are reverse engineered as CMR but there aren't any ejb-ref/ejb-local-ref tags which get generated in the deployment descriptor.
    <<It should be easy enough to add them with EJB Editor if they do not. >>
    You can double-click on the EJB to bring the EJB Module Editor and select "Relationships" node to add/edit/delete relationships visually.
    raghu
    JDev Team

  • Additional field in join table for CMP EJB

    Hello,
    I'm trying to perform this task using CMP entity beans:
    The entity A has a CMR relation of cardinality m-n with entity B (bidirectional) (This is working fine).
    I want to add a parameter to the relation.
    Ex : When I find that A1 is linked to B1, I need to perform "x" times an action. x would be my parameter, and I would have kept this parameter as an additional column in the join table A_TO_B.
    Could anyone provide an example of how to perform this with CMP EJB?
    NOTE: I'm using OC4J 10g 9.0.4 standalone (and cannot change my version).
    Thanks
    Tanguy

    Manohar,
    You need to create an append structure for table VBAP (for example ZAVBAP) using SE11. In this structure you create your ZZ fields. If you need a non-SAP domain/data element for your field then you need to create it first using the same transaction and activate it. Attach ZAVBAP to VBAP so the SE11 shows:
    .APPEND in the Fields column and
    ZAVBAP in the Field type column.
    Your ZZ fields will be shown automatically.
    When you have finished then activate your ZAVBAP structure. You will notice when you go VA01 (for example) that a lot of programs are being recompiled. Don't worry. It will be ok.
    The user-exit screen number for items is 8459 (in program SAPMV45A).
    Thanks,
    Wojtek

  • CMP EJB created base on Synonyms

    Hello,
    When created CMP EJBs based on Synonyms, entity to entity relationship (use -DassociateUsingThirdTable=true) works fine in JDeveloper embedded OC4J (10g release 1). If deploy to Oracle Application Server (10g release 2) got run time error:
    05/05/24 15:12:49 Error in bean User: Database Error
    java.sql.SQLException: ORA-00918: column ambiguously defined
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:137)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:304)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:271)
    at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:625)
    at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:181)
    at oracle.jdbc.driver.T4CPreparedStatement.execute_for_describe(T4CPreparedStatement.java:661)
    at oracle.jdbc.driver.OracleStatement.execute_maybe_describe(OracleStatement.java:959)
    at oracle.jdbc.driver.T4CPreparedStatement.execute_maybe_describe(T4CPreparedStatement.java:693)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1065)
    at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2901)
    at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:2942)
    at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].sql.FilterPreparedStatement.executeQuery(FilterPreparedStatement.java:270)
    at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].sql.FilterPreparedStatement.executeQuery(FilterPreparedStatement.java:270)
    at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].sql.FilterPreparedStatement.executeQuery(FilterPreparedStatement.java:270)
    at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].sql.PreparedStatementBCELProxy.executeQuery(PreparedStatementBCELProxy.java:31)
    at UserLocal_UserRoleLocal_ORCollection638.getObjects(UserLocal_UserRoleLocal_ORCollection638.java:74)
    at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].server.ejb.ORCollection.iterator(ORCollection.java:99)
    UserLocal_UserRoleLocal_ORCollection638.getObjectsUserLocal_UserRoleLocal_ORCollection638.getObjects(UserLocal_UserRoleLocal_ORCollection638.java:74)
    This is Application Server generated file. I have found two work around: one is create physical tables for the synonym tables, second is using ejbSelect method (EJB QL). But I still want to know if anybody has encountered this type of problem and any solution besides above memtioned work around.
    [email protected]
    Thanks,
    Eileen Young

    The issues are resolved now.
    1. This classpath entry problem was a bit mystifying. The manifest entry was
    correct and it should have picked it up automatically. When i restarted the
    server though, it started up properly.
    2. The CMP problem was a bit more troublesome. I think it was because of an
    incorrect datasource and connection pool properties. I used utils.Schema to
    check my database connection and once i got the url and driver name
    correctly it worked.
    TAR,
    Pavan

  • Running a CMP EJB with MySql DB Connection Problem

    I have created a CMP EJB in JDev connecting to a MySql table. I am able to see the connection in JDev just fine (everything is correctly configured for MySql). However, when I try to run it in the Embedded OC4J Server I get the following error:
    ****************************** Start of message output *************************************
    [Starting OC4J using the following ports: HTTP=8988, RMI=23891, JMS=9227.]
    C:\JDev9i\jdk\bin\javaw.exe -ojvm -classpath C:\JDev9i\j2ee\home\oc4j.jar com.evermind.server.OC4JServer -config C:\JDev9i\jdev\system\oc4j-config\server.xml
    Error instantiating application at file:/C:/JDeveloper/jdev/system/oc4j-config/applications/bc4j.ear: Unable to find/read assembly info for C:\JDeveloper\jdev\system\oc4j-config\applications/bc4j (IO error: unable to find bc4j)
    Error initializing data-source 'jdbc/MySqlCoreDS': DriverManagerDataSource driver 'org.gjt.mm.mysql.Driver' not found
    Copying default deployment descriptor from archive at F:\JavaProjects\Questionaire\QuestionsEJB\classes/META-INF/orion-ejb-jar.xml to deployment directory C:\JDev9i\jdev\system\oc4j-config\application-deployments\current-workspace-app\classes...
    Auto-deploying file:/F:/JavaProjects/Questionaire/QuestionsEJB/classes/ (No previous deployment found)... SQL error: No suitable driver
    Warning: Error creating table: No suitable driver
    done.
    Oracle9iAS (9.0.2.0.0) Containers for J2EE initialized
    ************************ End of message output ************************************
    I have updated the data-sources.xml to include the datasource:
         <data-source
              class="com.evermind.sql.DriverManagerDataSource"
              name="MySqlDS"
              location="jdbc/MySqlCoreDS"
              xa-location="jdbc/xa/MySqlXADS"
              ejb-location="jdbc/MySqlDS"
              connection-driver="org.gjt.mm.mysql.Driver"
              username="root"
              password="yes"
              url="jdbc:mysql://localhost:3306/questionaire?ultradevhack=true"
              inactivity-timeout="30"
         />
    What else to I need to do to get this working?
    Thanks,
    Karl

    I have created a CMP EJB in JDev connecting to a MySql table. I am able to see the connection in JDev just fine (everything is correctly configured for MySql). However, when I try to run it in the Embedded OC4J Server I get the following error:
    Error initializing data-source 'jdbc/MySqlCoreDS': DriverManagerDataSource driver 'org.gjt.mm.mysql.Driver' not foundMake sure that you create a Library in JDeveloper containing the MySQL JAR files and add this library to your project before launching starting the embedded OC4J instance.
    Rob

  • Cluster and Session EJB replication

              I have a dedicated Weblogic 5.1 box running with SP 6 serving up JSP and Servlets.
              The Servlets do look ups for session EJBs, which are hosted on a separate box behind
              a firewall. My question is:
              If I implement clustering of the JSP/Servlet Weblogic Instance so that I have four machines in a cluster,
              does Weblogic 5.1 or 6.0 replicate the handle to the session EJB's stub only so that in case server 1 crashes,
              Server 2 will be able to retrieve a handle to the session EJBs?
              Thanks,
              Paul Richardson
              

    If the handle is in the HttpSession, then the handle will be replicated. If
              the EJB server fails over in WL 5.1, the stateful session EJBs will be lost.
              WL 6.0 supports statefull session EJB replication for failover, but I
              suggest that you not use it unless you have a specific architectural reason
              to.
              Cameron Purdy
              Tangosol, Inc.
              http://www.tangosol.com
              +1.617.623.5782
              WebLogic Consulting Available
              "Paul Richardson" <[email protected]> wrote in message
              news:[email protected]..
              >
              > I have a dedicated Weblogic 5.1 box running with SP 6 serving up JSP and
              Servlets.
              > The Servlets do look ups for session EJBs, which are hosted on a separate
              box behind
              > a firewall. My question is:
              >
              > If I implement clustering of the JSP/Servlet Weblogic Instance so that I
              have four machines in a cluster,
              > does Weblogic 5.1 or 6.0 replicate the handle to the session EJB's stub
              only so that in case server 1 crashes,
              > Server 2 will be able to retrieve a handle to the session EJBs?
              >
              >
              > Thanks,
              > Paul Richardson
              

Maybe you are looking for

  • Second wireless connection causes problems

    I have some friends who are having the following problem: They have BT Infinity and a HH4. Their desktop PC has a built-in wifi card which they use to connect to the HH4 on the 2.4GHz band. This generally works ok. I know that a cable would be prefer

  • Dynamic time field in Variant

    Hi , I would like to create a variant for a custom report with time being dynamic.Purpose is to execute this report every hour as background job with time also as an input .ie suppose job is running every hour , report should fetch data  within this

  • Urgent...Consignment fill up error

    Dear All, I am new to the area of consignment. I am implementing consignment process from scratch. I tried creating a Consignment fill up and got the following error. Please advise me in detail ERROR: Consignment orders must be created from notificat

  • Problem deplying Struts app under home orabpel hw_services

    Hi guys, I have soasuite v10.1.3.1.0 installed on my system. I am trying to deploy a STRUTS application under home>orabpel>hw_services: Application Name: gpi-mms-app (one web-module and one ejb) Parent Application: hw_services (Human Workflow Service

  • IIF Usage - Script Logic

    Hello Everyone, Sorry to bother you, but i've one 'dummy' question for you. I've written  a script but there is a problem with IIF. IIF returns always true value, while i use it like that: (I'm sending the whole code 'cause i don't want to misguide y