Discussion:
Converting from Windows to Solaris Unix?
(too old to reply)
Paul VanOver
2006-05-05 17:14:56 UTC
Permalink
I have a WAR file that I deployed in JRun4 on a windows based machine and it
runs perfect. I have since discovered that the client has a unix box running,
so I am trying to get the same WAR file to run on the Unix box. My DBA
installed JRun 4 on our Unix box. I put my WAR file in the self deploy
directory of the Default server and it self-deployed. I tried accessing the
application and got an error about the page not being available.

In our web application we are creating a database connection and statement
object in a SessionListener class. You can this call taking place in the stack
trace at the bottom around line 717/739 ( I included the log file numbers for
ease of reading )

This call takes place as soon as the session is getting fired up and that is
why the application blows up immediately.

I am wondering if there is something else that I am missing. I assumed that
since it ran great on the JRun4 for Windows, that I would get the same result
on the Unix box.

A few pieces of information if this helps: The code was compiled on a Windows
based machine that has java 1.4.2_10-b03 on it. The Unix box looks like it has
java 1.4.1_01a-b01.

I am using the Oracle Thin client, so I assume I don't need to create a JDBC
data source.

The connection code in the SessionListener is as follows:
----------------

// Get the connection
Class.forName( "oracle.jdbc.driver.OracleDriver");
_con =
DriverManager.getConnection("jdbc:oracle:thin:@ajax:1521:gdt2", db_username,
db_password);
_stmt = _con.createStatement();

----------------

I think the above lines of code are the culprit based on the log file, but I
don't know why for sure. Does anyone have any suggestions? Thanks so much for
your time and help. Paul

------- the log file....
700 / 739 java.lang.NoClassDefFoundError: java/sql/Savepoint
701 / 739 at java.lang.ClassLoader.defineClass0(Native Method)
702 / 739 at java.lang.ClassLoader.defineClass(ClassLoader.java:486)

703 / 739 at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111)
704 / 739 at
jrunx.util.JRunURLClassLoader.defineClass(JRunURLClassLoader.java:187)
705 / 739 at
jrunx.util.JRunURLClassLoader.findClass(JRunURLClassLoader.java:152)
706 / 739 at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
707 / 739 at
jrunx.util.JRunURLClassLoader.loadClass(JRunURLClassLoader.java:77)
708 / 739 at
jrunx.util.JRunURLClassLoader.loadClass(JRunURLClassLoader.java:69)
709 / 739 at
java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
710 / 739 at
oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:468)
711 / 739 at
oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:314)
712 / 739 at
java.sql.DriverManager.getConnection(DriverManager.java:517)
713 / 739 at
java.sql.DriverManager.getConnection(DriverManager.java:177)
714 / 739 at org.gdot.rpt.Dbconnection.init(Dbconnection.java:40)
715 / 739 at
org.gdot.rpt.Dbconnection.getConnection(Dbconnection.java:63)
716 / 739 at
org.gdot.rpt.Dbconnection.getStatement(Dbconnection.java:76)
717 / 739 at
org.gdot.rpt.SessionListener.sessionCreated(SessionListener.java:46)
718 / 739 at
jrun.servlet.session.SessionService.fireSessionCreatedEvent(SessionService.java:
1410)
719 / 739 at
jrun.servlet.session.SessionService.createSession(SessionService.java:1211)
720 / 739 at
jrun.servlet.ForwardRequest.getSession(ForwardRequest.java:341)
721 / 739 at
jrun.jsp.runtime.JRunPageContext.initialize(JRunPageContext.java:83)
722 / 739 at
jrun.jsp.runtime.JRunJspFactory.getPageContext(JRunJspFactory.java:67)
723 / 739 at jrun__index2ejspa._jspService(jrun__index2ejspa.java:39)

724 / 739 at
jrun.jsp.runtime.HttpJSPServlet.service(HttpJSPServlet.java:43)
725 / 739 at jrun.jsp.JSPServlet.service(JSPServlet.java:119)
726 / 739 at
jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91)
727 / 739 at
jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
728 / 739 at
jrun.servlet.JRunRequestDispatcher.invokeNext(JRunRequestDispatcher.java:439)

729 / 739 at
jrun.servlet.JRunRequestDispatcher.forwardInvoke(JRunRequestDispatcher.java:409)

730 / 739 at
jrun.servlet.JRunRequestDispatcher.forward(JRunRequestDispatcher.java:178)
731 / 739 at
jrun.servlet.file.FileServlet.service(FileServlet.java:300)
732 / 739 at
jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91)
733 / 739 at
jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
734 / 739 at
jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:252)
735 / 739 at
jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:527)
736 / 739 at
jrun.servlet.http.WebService.invokeRunnable(WebService.java:168)
737 / 739 at
jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:451)

738 / 739 at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
Gurdeep Singh
2006-05-06 04:47:04 UTC
Permalink
It seems that your web application is using the class java.sql.SavePoint
which is unavailable in jdk1.3. If your application runs fine on windows,
you are probably running JRun using jdk1.4 on windows and trying to run the
same using jdk1.3 on solaris. Please switch to jdk 1.4 on your solaris box
as well.

Thanks,

Gurdeep
Paul VanOver
2006-05-08 16:59:00 UTC
Permalink
As it turns out, there were 2 reasons it wasn't working and Gurdeep Singh has
part of the answer. The Windows environment was running 1.4.10 and the JRun
JVM settings were pointing towards a Java 1.3.1 version. This was only a small
part of the problem. The bigger part of the problem was the JDBC drivers were
not in the class path of the JRun Default server. I could have either added
the path to the JDBC drivers to my classpath or I could have copied the JDBC
drivers directly into my application. Either way, the problem is now resolved.
Thanks Gurdeep Singh


paul

Loading...