Alan Peltz

Greenhorn
+ Follow
since Dec 12, 2003
Merit badge: grant badges
For More
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 Alan Peltz

Thanks for the replys. I'll give it a try.
I'm looking for a way to specify a schema name in the database connection string or other connection properties. I am using WSAD 5.1.2 and a WAS5.1 server. If my application logs in as schema owner, it sees all the tables, views, functions, etc. just fine, but if I log in as an application user I can't.

I know that this can be fixed with private synonyms or by specifying the schema before the table reference (e.g. select * from fnsuser.fns_comm_customer). I think there should be a better/easier way. I'm pretty sure I've done this before with an oracle:thin driver. It looked something like this: jdbc:oracle:thin:@10.8.30.54:1526:FNSUSER

Is this possible with an oci driver? What am I missing?
18 years ago
I'm looking for a way to specify a schema name in the database connection string or other connection properties. I am using WSAD 5.1.2 and a WAS5.1 server. If my application logs in as schema owner, it sees all the tables, views, functions, etc. just fine, but if I log in as an application user I can't.

I know that this can be fixed with private synonyms or by specifying the schema before the table reference (e.g. select * from fnsuser.fns_comm_customer). I think there should be a better/easier way. I'm pretty sure I've done this before with an oracle:thin driver. It looked something like this: jdbc:oracle:thin:@10.8.30.54:1526:FNSUSER

Is this possible with an oci driver? What am I missing?
18 years ago
I'm looking for a way to specify a schema name in the database connection string or other connection properties. I am using WSAD 5.1.2 and a WAS5.1 server. If my application logs in as schema owner, it sees all the tables, views, functions, etc. just fine, but if I log in as an application user I can't.

I know that this can be fixed with private synonyms or by specifying the schema before the table reference (e.g. select * from fnsuser.fns_comm_customer). I think there should be a better/easier way. I'm pretty sure I've done this before with an oracle:thin driver. It looked something like this: jdbc racle:thin:@10.8.30.54:1526:FNSUSER

Is this possible with an oci driver? What am I missing?
Just in case anyone else was wondering, I found a solution to this on another forum.

RequestDispatcher rd = request.getRequestDispatcher("ofroiWeb/FinalForm.do");
// wrap the original response wrapper in a buffered response
BufferedHttpResponseWrapper buffResponse = new BufferedHttpResponseWrapper(response);

try {
// use the request dispatcher to invoke our page
// the response will be written into the buffResponse object.
rd.include(request, buffResponse);
} catch (ServletException e) {
throw e;
}

// retrieve the result
byte[] byteResult = buffResponse.getBuffer();
String result = new String(byteResult);

StringBuffer buffer = new StringBuffer();
buffer.append(result);

This solution worked like a charm. The guy that posted it said it only works if this call happens on the same server as the original call. BufferedHttpResponseWrapper is a class I had to create. I found good samples for this class at http://www.porcupyne.org/docs/browse_source/JavaXslt/com/oreilly/javaxslt/util/BufferedHttpResponseWrapper.java.html.

As you see I don't use a URL object at all. I use a RequestDispatcher instead. I use the BufferedHttpResponseWrapper so I could update the response object. I really don't have my mind completely wrapped around this solution, but it works so I'm happy.
18 years ago
I am trying to capture a snapshot of the HTML of a page at a certain stage. If I call the struts action class from a browser, this page comes up perfectly with the correct values where the JSP write tags resolved. When I try calling this struts action class from inside a different action class and capture the HTML in a buffer, the values that should be in the request object are not so the write tags produce nothing. I have tried calling this code snippet from a different JSP where the correct formbeans were in the request object and it still didn't produce the values. Here is my code snippet:

StringBuffer fullReportPath = new StringBuffer();
fullReportPath.append("http://devServer1:9080/ofroiWeb/FinalForm.do");

URL url = new URL(fullReportPath.toString());
BufferedReader br = null;

br = new BufferedReader(new InputStreamReader(url.openStream()));

StringBuffer buffer = new StringBuffer();

String str;
while ((str = br.readLine()) != null) {
buffer.append(str);
}

// Close the input stream and return bytes
br.close();


I have been thinking about a workaround, where I put the formbean in the session and then change the JSP to look in the session for it rather than the request object, but I don't want to do this unless I have to.

Thanks,
Alan
18 years ago

Originally posted by Mary Wallace:
Why state agencies doesnt want to implement any frameworks?

Most of the state agencies projects are developed by vendors and they are the deciding factors whether to got with any framework or not. Am i right?



We develop most of our projects in house, but don't have the freedom to use whatever we want. There are restrictions and processes before we do anything.

As far as my initial question goes. I like some of the drag-and-drop programming things I see in JDeveloper and other products like that. Do you ever see an IDE making a drag-and-drop type interface without using heavy frameworks and EJBs?
19 years ago
I've never used spring or any of the other IoC or dependency interjection type frameworks, but I like the concepts. The reason my company doesn't use them is because we are a state agency and state agencies tend to be safe. If it isn't put out by IBM or Oracle, we might not ever get to use it. Those companies are pushing heavy frameworks for self-serving purposes. Do you think there will ever come a day when the IBMs and Oracles of this world will embrace and incorporate the Springs of this world? Does this question go against the rules of dependency interjection altogether?
19 years ago
I don't have WSAD. I am testing it after deploying to WAS.
19 years ago
One other question for anybody out there. Jboss has a web-console where I can look and see all kinds of settings on the app server and invoke some Mbean methods. Does Websphere have something like this?
19 years ago
Good question Vijay. At the end of the code that I have listed, I have the following:

if (ds == null) {
throw new NameNotFoundException("Unable to lookup OWSI datasource in JNDI tree.");
}

and at the end of all of those error messages, I get:

javax.naming.NameNotFoundException: Unable to lookup OWSI datasource in JNDI tree.

Thanks for looking Vijay.
19 years ago
I have to deploy to a websphere box at another location. I am testing an application, developed with Jboss3.2.1 as application server, where it works just fine in my websphere5.1.0.5 environment on my desktop.
I have a datasource that I set up in the administrative console with the JNDI name of jdbc/oel. I have tested the connection and it tests fine.
As soon as I do something on the application that I am testing that has to access the database I get the following errors. If you look at the code below you will see why there are so many.

javax.naming.NameNotFoundException: Name not found in context "java:".
.
.
javax.naming.NameNotFoundException: Name jdbc not found in context "java:".
.
.
javax.naming.NameNotFoundException: Name jdbc not found in context "java:".
.
.
A NamingException is being thrown from a javax.naming.Context implementation. Details follow:
Context implementation: com.ibm.ws.naming.java.javaURLContextRoot
Context method: wookup(Name)
Context name: java:
Target name: comp/env/jdbc/oel/
Other data:
Exception stack trace: javax.naming.NotContextException: The object bound to comp/env/jdbc/oel in the context "java:" is not a context.
.
.
javax.naming.NotContextException: The object bound to comp/env/jdbc/oel in the context "java:" is not a context.
.
.
javax.naming.NameNotFoundException: Name not found in context "java:".
.
.
A Reference object looked up from the context "java:" with the name "comp/env/jdbc/oel" was sent to the JNDI Naming Manager and an exception resulted. Reference data follows:
Reference Factory Class Name: com.ibm.ws.util.ResRefJndiLookupObjectFactory
Reference Factory Class Location URLs: null
Reference Class Name: java.lang.Object
Type: ResRefJndiLookupInfo
Content: com.ibm.ws.util.ResRefJndiLookupInfo@6e3151f4 ResRefJndiLookupInfo: Look up Name="jdbc/oel";JndiLookupInfo: jndiName="java:/jdbc/oel"; providerURL=""; initialContextFactory=""

Exception data follows:
javax.naming.ConfigurationException: Bad protocol: localhost
.
.
A NamingException is being thrown from a javax.naming.Context implementation. Details follow:
Context implementation: com.ibm.ws.naming.java.javaURLContextRoot
Context method: wookup(Name)
Context name: java:
Target name: comp/env/jdbc/oel
Other data:
Exception stack trace: com.ibm.websphere.naming.CannotInstantiateObjectException: Exception occurred while the JNDI NamingManager was processing a javax.naming.Reference object. Root exception is javax.naming.ConfigurationException: Bad protocol: localhost
.
.
com.ibm.websphere.naming.CannotInstantiateObjectException: Exception occurred while the JNDI NamingManager was processing a javax.naming.Reference object. Root exception is javax.naming.ConfigurationException: Bad protocol: localhost
.
.
javax.naming.NameNotFoundException: Name not found in context "java:".
.
.
javax.naming.ConfigurationException: Bad protocol: localhost
.
.
javax.naming.ConfigurationException: Bad protocol: localhost
.
.
javax.naming.ConfigurationException: Bad protocol: localhost
.
.
javax.naming.ConfigurationException: Bad protocol: localhost


Here is the code from the dao:

String [] names = {"java:/jdbc/oel", "java:/jdbc/oel/", "java:jdbc/oel/", "java:jdbc/oel", "java:comp/env/jdbc/oel/", "java:/comp/env/jdbc/oel/", "java:comp/env/jdbc/oel", "java:/comp/env/jdbc/oel", "/jdbc/oel", "jdbc/oel", "/jdbc/oel/", "/jdbc/oel"}

for (int ii = 0; ii LESSTHAN names.length; ii++) {
try
{
javax.naming.InitialContext ic = new javax.naming.InitialContext();
ds = (DataSource) ic.wookup(names[ii]);
}
catch (NameNotFoundException e) {
logger.error(VHException.getStackTraceAsString(e));
}
catch (NamingException e) {
logger.error(VHException.getStackTraceAsString(e));
}
if (ds != null) {
break;
}
}


As you can see, I've been trying a lot of different JNDI names. I have been wallowing in this problem for days now. Any direction is helpful.
Thanks!
[ August 20, 2004: Message edited by: Alan Peltz ]
19 years ago
Up to this point, my shop has been using a custom made framework... It isn't the best. I've heard good things about Tapestry and Webworks2.0. Any thoughts, suggestions, etc.?
Thanks for the replies everyone! I am in contact with some people from IBM to get the lowdown from their perspective and a trial version. Is there anyone out there that would like to add anything or voice their opinions (maybe someone that doesn't work for IBM)? I am curious about something that Jeanne said. What commercial addins for eclipse could make it a better place to develop?
Hello All,
We have been developing J2EE applications for almost 2 years. We have been using Eclipse as our IDE, a custom built framework, and deploying to a Jboss/Tomcat environment. Soon we will be forced to deploy to a Websphere server. Our custom built framework isn�t all that good and so we are looking at Struts. We currently use Together Control Center for diagramming and were considering switching if it makes sense. From what I understand I could get a somewhat integrated version of Rational XDE (aka Rational Rose) with WSAD.
What do you all think about moving from Eclipse to WSAD?
I currently have no plug-ins in Eclipse. Are there plug-ins that I could load up on Eclipse to make it a better option than WSAD?
Are there any benefits for using WSAD and XDE together?
What about benefits of using WSAD and Struts together?
As you can see I�m full of questions. Any help would be welcome.
Thanks,
Alan