Win a copy of Modern JavaScript for the Impatient this week in the Server-Side JavaScript and NodeJS forum!

richard marais

Ranch Hand
+ Follow
since Aug 20, 2001
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by richard marais

Yes, the application does unpack to %catalina_home%\webapps\xrad2\...
I do have my 3rd party classes in the .war file, so they get unpacked too ( %catalina_home%\webapps\xrad2\WEB-INF\lib\ ).
Is this the correct directory to put them in? Why does Tomcat not see them?
17 years ago
I have installed Tomcat app server 4.0. I export a .war file to the %catalina_home%\webapps\ directory. When I start the server, it unpacks the .war file correctly, but I get a java.lang.NoClassDefFoundError because my application needs some 3rd party classes to run (jaxb-api.jar).
I have got the jaxb-api.jar file in the %catalina_home%\webapps\xrad2\WEB-INF\lib\ directory. If I copy it to the %catalina_home%\lib directory, my application runs fine.
My question is, how can I get Tomcat to look at my applications lib directory for the third party classes? Resin app server seems to be able to do this. Can Tomcat?
The reason I want to be able to do this, is because many users will be installing this application on different types of app servers, and I want to keep the configuration issues to a minimum. I don't want them to have to copy the 3rd party classes, they should be part of the .war file.
Thanks
17 years ago
Hi,
What is the best way to determine what the database status is after a SQLException has occurred.
Eg. Oracle returns the following if you try delete a record with children.
ORA-02292: integrity constraint (ASS_USER.SYS_C001313) violated - child record found
Is there a method call that is not database specific? I need to determine when the above error is occuring, but on any database.
I have tried e.getSQLState() which returns a string '23000'. Can I rely on this?
Thanks in advance
Hi Kyle,
I checked and each cmp bean has a primary key.
I it incorrect to export 'deployed ejb' jar from VAJ into WSAD? Should I rather export an ejb jar?
18 years ago
Hi Kyle,
I only got the EJB project to complie its classes. When I try and build/rebuild the web project I get the following error message:
Build Problems:
Problems occured building the selected resources: java.lang.NullPointerException encountered while running org.eclipse.jdt.internal.core.builder.impl.JavaBuilder.
Do you have any suggestions?
Thanks
18 years ago
Kyle, please ignore quetion 2 above. I have managed to get the code to complie. (Did nothing apart from rebooting the pc, wierd). thanks
18 years ago
Hi Kyle
As I said previously I have been having a few problems with WSAD. I am trying to migrate a working project from VAJ(3.5) to WSAD(beta). I looked at the 'Online Auction' sample WSAD provides & covers in the help documentation, and have tried to base my structure on it.
1. I seem to have a problem connecting my CMP EJBs to the db schema.
I have imported a deployed EJB jar file from VAJ (containing CMP & session EJBs). I have placed it in an 'EJB Project' in WSAD. In the J2EE View I can see each bean & their columns. However in the Navigator view I can only see the Schema.dbxmi, ejb-jar.xml & other xmi & MF files under META-INF.
I have managed to create an Oracle db connection. Can see the all the tables, no probs.
In the J2EE view I right click my EJB (under EJB Modules) select Generate for enterprise beans > Create EJB to RDB Mapping. I select Meet in the Middle, because the tables already exist on the db & the cmp beans already exist. I select 'match by name'.
I create a session ItemHelper EJB.
**In the J2EE View mode I can see all the beans, but when I double click them they do not open in the editor.
I set the JNDI name in the EJB extension editor tp 'jdbc/ora' where 'ora' is the name of the db. Each individual bean already has their JNDI name filled in matching the package structure from the exported ejb's from VAJ (ie. 'com/orygen/entity/Task'). But I changed it to 'ejb/Task'.
I imported a deployed EJB jar file from VAJ. The bean names have changed to include the dir structure (ie. 'com/orygen/entity/Task' has changed to 'com_orygen_entity_Task'). Is this right?
I select Generate for enterprise beans > Deploy code and RMIC Stub and Tie code. I select all the beans & finish. I get the following error:
RMIC deploy code: Deployment of TimesheetEJB did not complete successfully due to the following error: RMIC Command returned RC = 1.
Do you have any suggestions?
2. I have imported a jar from VAJ containing numerous classes into a 'Web Project' in WSAD. I have placed the packages in a source directory.
**When I click build it does not compile the code. I have some obvious errors (eg. no semi-colon) and it does not pick it up. It does not create the *.class file.
Thanks in advance
18 years ago
Hi Fred
The tool I am talking about is supposed to replace VAJ.
They seem to have combined VAJ & WS Studio. It looks like a very impressive tool. But has changed a bit from VAJ.
You can download a beta for free at: http://www-4.ibm.com/software/webservers/studio/preregister.html
(WebSphere Studio Application Developer Preview for Windows)
The download is mode up of 3 70MB exe files.
18 years ago
Hi
Has anyone successfully developed EJB's on 'Websphere Studio Application Developer' (the new VAJ)?
I have been working on VAJ devloping CMP EJB's for a while and found it pretty basic. Now I am trying to convert to 'WS Application Developer' and find it very confusing. How has everyone else found it?
18 years ago
When I run the test client in VAJ to access a CMP EJB (which was working before, no changes) I get the following error:
Cannot get EJB meta data. Exception is: java.rmi.MarshalException: CORBA COMM_FAILURE 3 No; nested exception is:
org.omg.CORBA.COMM_FAILURE: minor code: 3 completed: No
Does anyone know how to fix this?
18 years ago
When I run the test client in VAJ to access a CMP EJB (which was working before, no changes) I get the following error:
Cannot get EJB meta data. Exception is: java.rmi.MarshalException: CORBA COMM_FAILURE 3 No; nested exception is:
org.omg.CORBA.COMM_FAILURE: minor code: 3 completed: No
Does anyone know how to fix this?
I have a String that consists of XML data & tags. I need to convert the String to a JDOM Document Object. Does anyone know how?
I have tried the following with no success:
public void setXMLResultSetString(String pResSetString)
{
try
{
System.out.println(pResSetString);
SAXBuilder db = new SAXBuilder();
StringReader sr = new StringReader (pResSetString);
Document doc = db.build((Reader)sr);
System.out.println(doc);
...
I get the following error:
[Document: No DOCTYPE declaration. Root - [Element: <ResultSet/>]]
The pResSetString is the following:
<?xml version="1.0" encoding="UTF-8"?>
<ResultSet Name="Timesheet Project" TotalRows="16">
<!--Timesheet Project-->
<Row num="1">
<description>Document System -</description>
<project_name>Document System</project_name>
<client_id>1001</client_id>
<client_name>Merill Lynch</client_name>
</Row>
<Row num="2">
<description>Chase System -</description>
<project_name>Chase System</project_name>
<client_id>1002</client_id>
<client_name>Chase</client_name>
</Row>
<Row num="3">
<description>Chase System - Development</description>
<project_name>Chase System</project_name>
<client_id>1002</client_id>
<client_name>Chase</client_name>
</Row>
<Row num="4">
<description>Somelia COOL:Gen -</description>
<project_name>Somelia COOL:GEN</project_name>
<client_id>1003</client_id>
<client_name>Someila</client_name>
</Row>
<Row num="5">
<description>Customer Meeting/Presentation</description>
<project_name>Customer</project_name>
<client_id>1004</client_id>
<client_name>Orygen</client_name>
</Row>
<Row num="6">
<description>Preparation for Meetings, etc.</description>
<project_name>Customer</project_name>
<client_id>1004</client_id>
<client_name>Orygen</client_name>
</Row>
<Row num="7">
<description>Research & Development</description>
<project_name>R&D</project_name>
<client_id>1004</client_id>
<client_name>Orygen</client_name>
</Row>
<Row num="8">
<description>Inhouse Self Study</description>
<project_name>Inhouse</project_name>
<client_id>1004</client_id>
<client_name>Orygen</client_name>
</Row>
<Row num="9">
<description>External Training</description>
<project_name>Inhouse</project_name>
<client_id>1004</client_id>
<client_name>Orygen</client_name>
</Row>
<Row num="10">
<description>Inhouse Courses</description>
<project_name>Inhouse</project_name>
<client_id>1004</client_id>
<client_name>Orygen</client_name>
</Row>
<Row num="11">
<description>Orygen Internal Meeting</description>
<project_name>null</project_name>
<client_id>1004</client_id>
<client_name>Orygen</client_name>
</Row>
<Row num="12">
<description>Account Specific Meetings</description>
<project_name>null</project_name>
<client_id>1004</client_id>
<client_name>Orygen</client_name>
</Row>
<Row num="13">
<description>Account Management</description>
<project_name>null</project_name>
<client_id>1004</client_id>
<client_name>Orygen</client_name>
</Row>
<Row num="14">
<description>Annual Leave</description>
<project_name>null</project_name>
<client_id>1004</client_id>
<client_name>Orygen</client_name>
</Row>
<Row num="15">
<description>Sick Leave</description>
<project_name>null</project_name>
<client_id>1004</client_id>
<client_name>Orygen</client_name>
</Row>
<Row num="16">
<description>Bank Holidays</description>
<project_name>null</project_name>
<client_id>1004</client_id>
<client_name>Orygen</client_name>
</Row>
</ResultSet>
Do I need to install the EMSRV Server then?
19 years ago
I have successfully created a Database Schema, CMP EJB and associated classes which all work fine. Now somone else also needs to work on it, we are using Visual Age as our development tool.
What is the best way for them to import the schema, ejb and supporting classes?
I have tried exporting the repository, jars, but then what about the schema? do you need to generate it again from the imported jar? but then you loose the foreign key relationships.
Have tried to create the ejb from the existing schema but then you loose any work you have done to the ejb.
There must be and efficient all encompassing way to export then import ones project, ejb and schema in VAJ, does anyone know?
19 years ago
I have successfully created a Database Schema, CMP EJB and associated classes which all work fine. Now somone else also needs to work on it, we are using Visual Age as our development tool.
What is the best way for them to import the schema, ejb and supporting classes?
I have tried exporting the repository, jars, but then what about the schema? do you need to generate it again from the imported jar? but then you loose the foreign key relationships.
Have tried to create the ejb from the existing schema but then you loose any work you have done to the ejb.
There must be and efficient all encompassing way to export then import ones project, ejb and schema in VAJ, does anyone know?