On Mon, May 29, 2006 at 12:31:12AM +0800, Justin See wrote: > I've tried to search for it but couldn't find an answer. > Please try to help me. > I've created an application and deployed and run successfully in the > first PC. I copied everything over, installed everything as the > first PC. > 1) I've the mysql-connector-java-3.1.12-bin.jar in the common/lib. > 2) Added this to the server.xml: > <Context> > <Resource name="jdbc/MySQLDB" auth="Container" > type="javax.sql.DataSource" username="root" password="password" > driverClassName=" com.mysql.jdbc.Driver" > url="jdbc:mysql://localhost:3306/transport" > maxActive="8" maxIdle="4"/> > </Context> > 3) Added this to the web.xml > <description>MySQL Connection</description> > <resource-ref> > <description>DB Connection</description> > <res-ref-name>jdbc/MySQLDB</res-ref-name> > <res-type> javax.sql.DataSource</res-type> > <res-auth>Container</res-auth> > </resource-ref>
> 4) Set the environment variable: CLASSPATH=C:\Program Files\netbeans- > 5.0\enterprise2\jakarta-tomcat-5.5.9\common > lib > Now when i deploy and start the application on the Tomcat, Tomcat > logs give me this error: > May 28, 2006 10:46:10 PM > org.apache.catalina.mbeans.ServerLifecycleListenercreateMBeans > SEVERE: createMBeans: Throwable > java.lang.NullPointerException > at org.apache.catalina.mbeans.MBeanUtils.createObjectName( > MBeanUtils.java:1079) Are you using the Tomcat server distributed with NB, have you set this one up as an "external" server in NB or is this problem occurring outside of NB? If it is occurring when you 'run project' from within NB, then you may want to connect with the NetBeans user mailing list. Additionally, if the application functions properly within NB but blows up when you deploy the .war file, the same applies. Occasionally, there can be intricacies with deployment internally as opposed to externally. Usually, in my limited experience, this is because of difficulties in properly specifying the location of libraries. Thanks. mp -- Michael Powe [EMAIL PROTECTED] Naugatuck CT USA 47.3% of all statistics are made up on the spot. - Steven Wright
pgpLFFfwaKKrS.pgp
Description: PGP signature