My SQL users not inserting
kalichar Nov 19, 2005 10:03 AMHi,
I am trying to get the JBoss Portal running with MySQL and am facing issues. I am using JBoss Portal + JBoss AS 4.0.2 that I have freshly downloaded from the JBoss website. In my SQL, I have a schema titled, jbossportal with a user associated with that has all access and has a login of portal and password of portal password.
Have the mysql driver jar copied to the /server/default/lib directory.
Have mysql-ds.xml in server/default/deploy with the changes made to connect to the jbossportal schema. The data source has been setup as the default.
Have portal-mysql-ds.xml configures as well.
Have changed conf/standardjaws.xml to user mysql mapping
Have changed hibernate configuration file to use MySQLDialect.
When I start my server, the user objects are not being inserted into the tables with the following exceptions. Thanks in advance for any assistance.
09:06:56,984 INFO [SessionFactoryBinder] Creating database content
09:06:57,078 INFO [STDOUT] Hibernate: insert into jbp_roles (jbp_name, jbp_disp
layname) values (?, ?)
09:06:57,093 INFO [STDOUT] Hibernate: insert into jbp_roles (jbp_name, jbp_disp
layname) values (?, ?)
09:06:57,093 INFO [STDOUT] Hibernate: insert into jbp_users (jbp_root_pref_set_
id, jbp_uname, jbp_givenname, jbp_familyname, jbp_password, jbp_realemail, jbp_f
akeemail, jbp_regdate, jbp_viewrealemail, jbp_enabled) values (?, ?, ?, ?, ?, ?,
?, ?, ?, ?)
09:06:57,125 WARN [JDBCExceptionReporter] SQL Error: 1406, SQLState: 22001
09:06:57,125 ERROR [JDBCExceptionReporter] null, message from server: "Data too
long for column 'jbp_viewrealemail' at row 1"
09:06:57,125 ERROR [SessionFactoryBinder] Error in the bsh script
Sourced file: inline evaluation of: ``// This bsh script setup the default conte
nt of the portal. // It is called whe . . . '' : Method Invocation session.save
: at Line: 41 : in file: inline evaluation of: ``// This bsh script setup the d
efault content of the portal. // It is called whe . . . '' : session .save ( ad
min )
Target exception: org.hibernate.exception.GenericJDBCException: could not insert
: [org.jboss.portal.core.impl.user.UserImpl]
at bsh.BSHMethodInvocation.eval(Unknown Source)
at bsh.BSHPrimaryExpression.eval(Unknown Source)
at bsh.BSHPrimaryExpression.eval(Unknown Source)
at bsh.BSHBlock.evalBlock(Unknown Source)
at bsh.BSHBlock.eval(Unknown Source)
at bsh.BSHBlock.eval(Unknown Source)
at bsh.BSHTryStatement.eval(Unknown Source)
at bsh.Interpreter.eval(Unknown Source)
at bsh.Interpreter.eval(Unknown Source)
at bsh.Interpreter.eval(Unknown Source)
at org.jboss.portal.core.hibernate.SessionFactoryBinder.createContent(Se
ssionFactoryBinder.java:239)
at org.jboss.portal.core.hibernate.SessionFactoryBinder.startService(Ses
sionFactoryBinder.java:136)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanS
upport.java:272)
at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:1
73)
at org.jboss.portal.server.util.Service.start(Service.java:73)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
er.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractIntercept
or.java:121)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelM
BeanOperationInterceptor.java:127)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.