Win a copy of React Cookbook: Recipes for Mastering the React Framework this week in the HTML Pages with CSS and JavaScript forum!

eileen keeney

Ranch Hand
+ Follow
since May 04, 2009
Cows and Likes
Cows
Total received
1
In last 30 days
0
Total given
0
Likes
Total received
4
Received in last 30 days
0
Total given
3
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by eileen keeney

I solved my problem.

I went back to the MS site and downloaded another copy of the driver, and that seems to have fixed the issue.

Thank you for looking at my question and trying to help me.
Yes, I have verified that class com/microsoft/sqlserver/jdbc/SQLServerDataSource is in the jar file.  Note the warning message I get when using Java6 instead of Java7.  It specifically mentions this library as being a version that should be compiled with an upgraded compiler.  Since I do not get the warning using java7, I conclude that java7 is a compatible compiler with the library.
I also see this library listed when using jar -tf.

The code I am using, for this test, is almost exactly what is in the Example that comes with the library.  
The code line is:
SQLServerDataSource ds = new SQLServerDataSource();



Output:


upgrading from  java1.5 to java7  and from sqlserver jdbc 4 to 6.

I altered my CLASSPATH to point to the sqljdbc41.jar  found in the jre7 directory of sqljdbc_6.0 from the sqljdbc_6.0.8112.200_enu.tar
I have change dmy javac to use  /opt/java7/bin/javac  

I get this error:
Exception in thread "main" java.lang.NoClassDefFoundError: com/microsoft/sqlserver/jdbc/SQLServerDataSource

However,
I know the class is there because if I try to compile with java6, it gives me this:
warning: com/microsoft/sqlserver/jdbc/SQLServerDataSource.class(com/microsoft/sqlserver/jdbc:SQLServerDataSource.class): major version 51 is newer than 50, the highest major version supported by this compiler.
It is recommended that the compiler be upgraded.

Then I compile with java7, it compiles without warning.
But when I run the code it gives the NoClassDefFoundError
Exception in thread "main" java.lang.NoClassDefFoundError: com/microsoft/sqlserver/jdbc/SQLServerDataSource
       at testms.main(testms.java:31)
Caused by: java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDataSource
       at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
       at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
       at java.security.AccessController.doPrivileged(Native Method)
       at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
       at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:358)

I have also tried mssql-jdbc-6.2.2.jre7.jar  found in sqljdbc_6.2.2.1_enu.tar

I have verified that my CLASSPATH does include the needed jar, and includes only ONE mssql jar at the time I compile.

I am running this on hpux itanium 11

I had them roll the system back to the state before the patch.  
I will now play with the application on a test system.
When I find out what the issue was, I can post a followup here, in case anyone else ends up having the same problem.
4 years ago
I am getting this error, after the IT team did an HPUX patch.

SEVERE: invoker: Cannot allocate servlet instance for path //ecs/servlet/EcsIi
javax.servlet.ServletException: Error allocating a servlet instance
       at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:795)
       at org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:370)
       at org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:134)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:627)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
       at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200)
       at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
       at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:775)
       at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:704)
       at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:897)
       at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
       at java.lang.Thread.run(Thread.java:657)

Has anyone seen the same issue after an HPUX patch was installed?  Does anyone know what might have changed, and/or how to resolve the issue?
Thank you.
4 years ago

Joshua Mccartney wrote:I don't think so. For me 50 above because they have some problems when it comes to their eyes and ears. They will have a poor eyesight because of the radiation coming from the computer.



What about our arms and hands, from all of that keyboard work?

My arm is going to give out before my eyes or ears.
I do get stronger glasses every few years, but so far that completely eliminates any decreased productivity due to my aging eyes.


Ideally a company would have a healthy mix of experienced and younger employees (to become the experienced employees of the future).


9 years ago

Henry Wong wrote:

eileen keeney wrote:Thank you,

That worked.

I have no idea why making the variable public static would cause the type of error it caused.


But changing it fixed the problem.



Question: do you know what it means for a field variable to be static?



I do now, but I didn't until a few minutes ago when I looked it up.
9 years ago
Thank you,

That worked.

I have no idea why using public static would cause the type of error it caused.

But changing it fixed the problem.

Then I looked more closely at my past code that had no issues with objects, and noticed I had not used static except in the method definitions.



9 years ago
I have a bug in the below, that causes all of the array slots to be populated with the same value.

I have successfully populated arrays of objects in the past using this same technique. But now I can not get this to work.

if I populate array[0] the value shows up in array[1] and array[2] as well.


Code:

public class TestObj
{
public static int i1;
public static String s1;

//----------------------------------------------------
public static TestObj populateObj(int iIn)
{
TestObj testObj1 = new TestObj();
testObj1.i1 = iIn;
testObj1.s1 = String.format("The Number is %2d", iIn);
return testObj1;
}//end method
//----------------------------------------------------

public static TestObj[] buildObjArray()
{
TestObj[] myTestObjArray = new TestObj[3];
String s1;
TestObj testObj = new TestObj();

for (int i=0; i<3; i++)
{
testObj = new TestObj();
testObj = populateObj(i+1);
System.out.println(testObj.s1); //this has correct value
myTestObjArray[i] = testObj;
}

//read array
System.out.println("Reading Array:");
for (int j=0; j<3; j++)
{
System.out.println(myTestObjArray[j].s1);
}

//test changing value in slot 0
testObj = new TestObj();
testObj.s1 = "This is a Test";
myTestObjArray[0] = testObj;
//display value in slot 2 (which somehow got populated in above)
System.out.println(myTestObjArray[2].s1);

return myTestObjArray;

}//end method

} //end class


Output when calling TestObj.buildObjArray()

The Number is 1
The Number is 2
The Number is 3
Reading Array:
The Number is 3
The Number is 3
The Number is 3
This is a Test

Even just at the end, where I explicitly assign "This is a Test" only to slot 0, it shows up in slot 2.



9 years ago
Ok,

I was thinking about this while I was taking a nap, but the answer to my one dilemma (related to this problem) actually came to me while I was in the shower.

It is not that they all need to be told that at least one person has blue eyes, because they all know this (just as they know that at least 49 people have blue eyes and they each know that everyone else knows that at least 48 people have blue eyes).
Needing to be told something you already know was just very illogical to me.

There is a lot of information that they all know to be true, and all know that everyone one else on the island also knows to be true.

What they needed, is to be aware that everyone else is, at some same point in time, considering this specific piece of information and acting logically on this specific piece of information.

Now if they could all have concluded that everyone acted on day one, with the knowledge that at least 48 of them had blue eyes, they (all of those with blue eyes) could have gotten off of the island faster. So what stopped them from drawing this conclusion if they were all so smart?
The lack of knowing that everyone else was also considering this information?










9 years ago

I don't drive. I know I would be a bad driver. I take the bus.

Back some years ago, when my younger sister was maybe just over 30, and just learning to drive; My brother-in-law asked me if any of the females in our family could drive.
I replied with
"No, but some of them have managed to get a license".

My two older sisters drive, and each tells me that the other's driving scares them.

9 years ago
I think that
IF the parents have the best interest of the child in mind, and know their child well, then their own life experience can actually be an asset to the process of finding a potential marriage mate for their child.
But those getting married should have a say, and not be forced if they are not comfortable.

I have selfish parents who never really took the time to know their children well.
My dad even once suggested to my sister that she should marry someone (from China) who needed to marry a US citizen to stay in the country. I think my Dad would have gotten some money in the deal.

I have seen many bad marriages that were a result of "Love" (or at least people who thought they were in Love).

Both methods can end up being very good, or being a disaster.

The only person I have spoken to, in any depth about this, who was themselves going to marry via such an arrangement, really trusted her parents to pick someone that would be good for her.
Before talking to her, I think I was much less aware that those involved in arranged marriages were so comfortable with it themselves.





9 years ago

vignesh karthick wrote:Hello arulk pillai. Thanks for your reply. Of-course, I do think the same. But my job is like, just monitoring and updating the errors in the excel sheets. I am doing this for past 1.5 years. As I am in support project I must adhere to rotational shifts so I am afraid I may not get much time to learn other modules. Now I am really confused whether to switch back to Java or be hang around with SAP and learn other modules like Abap, SD etc., please advice.



You don't know ABAP? Learn ABAP for sure, if you are going to do SAP work.
If you know any 3GL (cobol, basic, C etc ...) AND any 4GL type language (Informix SQL, oracle Forms, etc ...) ABAP is easy to pick up. It also has events (I don't know if many other 3GL languages typically have that concept.)
While ABAP does have an objects, so much of the code was written before that functionality existed.

I know I had trouble learning Java (after never before having trouble picking up a programming language).
I think it is because the paradigm shifted, and some of it because I am getting old.

Is it normal now that a large percent of programmers are very language specific, and can not easily (by just looking up syntax) work with another programming language (either doing development or troubleshooting).
9 years ago

Jesper de Jong wrote:Another solution



If someone wears these, does it stop them from snoring (or snoring as loud)?
I will have my sister try these when we share a suite on the cruise ship next month. Her snoring is often very loud.

9 years ago
Once the thing I am insured against happens, then it is an asset.
9 years ago