[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - JBoss 3.2.5/MySQL 4.0 ejbCreate throws NullPointer exception

pintovc do-not-reply at jboss.com
Sat Nov 4 15:56:03 EST 2006


I have created an EJB with CMP in JBoss 3.2.5. It deploys fine. When I try to create an EJB in the database table it gives me a NullPointerException error. Here is the trace

14:52:53,757 INFO  [UserProfile] Table 'UserProfile' already exists
14:52:54,278 INFO  [EJBDeployer] Deployed: file:/C:/devenv/jboss-3.2.5/server/default/tmp/deploy/tmp45702FiboApp.ear-contents/FiboEJB.jar
14:52:54,558 INFO  [TomcatDeployer] deploy, ctxPath=/fibo, warUrl=file:/C:/devenv/jboss-3.2.5/server/default/tmp/deploy/tmp45702FiboApp.ear-contents/FiboWeb.war/
14:52:54,919 INFO  [TomcatDeployer] ClusteredHTTPSessionService not found
14:52:54,919 ERROR [TomcatDeployer] Failed to setup clustering, clustering disabled
14:52:55,720 INFO  [EARDeployer] Started J2EE application: file:/C:/devenv/jboss-3.2.5/server/default/deploy/FiboApp.ear
14:52:56,230 INFO  [Server] JBoss (MX MicroKernel) [3.2.5 (build: CVSTag=JBoss_3_2_5 date=200406251954)] Started in 1m:15s:809ms
14:52:56,230 INFO  [Tomcat5] Saw org.jboss.system.server.started notification, starting connectors
14:52:56,571 INFO  [Http11Protocol] Starting Coyote HTTP/1.1 on http-0.0.0.0-8080
14:52:58,153 INFO  [ChannelSocket] JK2: ajp13 listening on /0.0.0.0:8009
14:52:58,173 INFO  [JkMain] Jk running ID=0 time=0/741  config=null
14:54:19,230 ERROR [LogInterceptor] TransactionRolledbackLocalException in method: public abstract wonomi.identityManagement.interfaces.UserProfileLocal wonomi.identityManagement.interfaces.UserProfileLocalHome.create(java.lang.String,java.lang.String) throws javax.ejb.CreateException, causedBy:
java.lang.NullPointerException
	at com.mysql.jdbc.PreparedStatement.asSql(PreparedStatement.java:562)
	at com.mysql.jdbc.PreparedStatement.asSql(PreparedStatement.java:504)
	at com.mysql.jdbc.PreparedStatement.toString(PreparedStatement.java:3228)
	at java.lang.String.valueOf(String.java:2131)
	at java.lang.StringBuffer.append(StringBuffer.java:370)
	at com.mysql.jdbc.trace.Tracer.printParameters(Tracer.aj:240)
	at com.mysql.jdbc.trace.Tracer.printEntering(Tracer.aj:167)

Here is the ejb Create method:
/**
	 * ejbCreate
	 * 
	 * @ejb.create-method view-type="local"
	 */
	public java.lang.Integer ejbCreate(java.lang.String name, String password)
			throws CreateException {
		setId(new Integer(1));
		setUserName(name);
		setPassword(password);
		return null;
	}

Any help will be greatly appreciated.


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3983244#3983244

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3983244



More information about the jboss-user mailing list