Java开发网 Java开发网
注册 | 登录 | 帮助 | 搜索 | 排行榜 | 发帖统计  

您没有登录

» Java开发网 » Java EE 综合讨论区 » Hibernate  

按打印兼容模式打印这个话题 打印话题    把这个话题寄给朋友 寄给朋友    该主题的所有更新都将Email到你的邮箱 订阅主题
flat modethreaded modego to previous topicgo to next topicgo to back
作者 HIBERNATE 初学者的 MS SQL Server 2000数据插入问题求教
casual





发贴: 10
积分: 0
于 2006-11-15 09:25 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
以下内容,是在Jbuilder 2006及Ms SQL Server 2000和JBOSS 4.0+运行, hibernate-3.1及Jdk 1.50运行,必要的.jar类文件均已引入,应用Servlet通过Hibernate对Sql Server 2000进行插入数据,所进行设置改动的文件如下:

1) 我的 Hibernate.cfg.xml:

<?xml version="1.0"?>
<!DOCTYPE hibernate-configuration PUBLIC
  "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
  "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="dialect">org.hibernate.dialect.MySQLDialect</property>
<property name="connection.driver_class">com.microsoft.jdbc.sqlserver.SQLServerDriver</property>
<property name="connection.url">jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=HAHA</property>
<property name="hibernate.connection.username">sa</property>
<property name="hibernate.connection.password">sa</property>
<property name="show_sql">true</property>
<property name="hibernate.transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>
<property name="hibernate.jdbc.fetch_size">25</property>
<property name="hibernate.jdbc.batch_size">5</property>
<mapping resource="mapVersion.hbm.xml"/>
</session-factory>
</hibernate-configuration>



作者 Re:HIBERNATE 初学者的 MS SQL Server 2000数据插入问题求教 [Re:casual]
casual





发贴: 10
积分: 0
于 2006-11-15 09:25 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
2) 我的 mapVersion.hbm.xml:

<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">

<hibernate-mapping package="sql">
<class name = "sql.mapVersion" table="Version">
<id name="id" column="_ID" type="int">
<generator class="native"/>
</id>
<property name="Version" column="_Version" type="java.lang.String" insert="true"/>
<property name="Power" column="_Power" type="int" insert="true"/>
</class>
</hibernate-mapping>



作者 Re:HIBERNATE 初学者的 MS SQL Server 2000数据插入问题求教 [Re:casual]
casual





发贴: 10
积分: 0
于 2006-11-15 09:26 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
3)我的 Ms SQL Server 2000库表生成代码:

create table Version (_ID int identity(1,1) primary key not null,_Version varchar(50),_Power int)



作者 Re:HIBERNATE 初学者的 MS SQL Server 2000数据插入问题求教 [Re:casual]
casual





发贴: 10
积分: 0
于 2006-11-15 09:26 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
4)我的 mapVersion 映射类:

package sql;
import java.lang.String;

public class mapVersion {

private int id;
private String Version = new String();
private int Power;

public int getId(){return this.id;}
public void setId(int _setId){this.id=_setId;}

public String getVersion(){return this.Version;}
public void setVersion(String _setVersion){this.Version = _setVersion;}

public int getPower(){return this.Power;}
public void setPower(int _setPower){this.Power=_setPower;}

}



作者 Re:HIBERNATE 初学者的 MS SQL Server 2000数据插入问题求教 [Re:casual]
casual





发贴: 10
积分: 0
于 2006-11-15 09:26 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
5)我的 HIBERNATEUTIL 类:

package sql;
import org.hibernate.HibernateException;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;

public class HIBERNATEUTIL {

private static final SessionFactory sessionFactory;

static {
try{
Configuration config = new Configuration().configure();
sessionFactory = config.buildSessionFactory();
}
catch(Throwable ex){
ex.printStackTrace();
throw new ExceptionInInitializerError(ex);
}
}

public static final ThreadLocal session = new ThreadLocal();

public static Session currentSession() throws HibernateException{
Session s = (Session) session.get();
if(s==null||!s.isOpen()){
s = sessionFactory.openSession();
session.setMoon;
}
return s;
}

public static void closeSession() throws HibernateException{
Session s = (Session) session.get();
session.set(null);
if(s!=null)
s.close();
}
}



作者 Re:HIBERNATE 初学者的 MS SQL Server 2000数据插入问题求教 [Re:casual]
casual





发贴: 10
积分: 0
于 2006-11-15 09:27 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
6)我的Servlet调用类[VerServlet]代码:

package web;
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.util.*;
import sql.mapVersion;
import sql.HIBERNATEUTIL;
import org.hibernate.*;
import org.hibernate.cache.*;
import org.hibernate.cfg.*;
import org.hibernate.cache.*;

public class Servlet extends HttpServlet {
private static final String CONTENT_TYPE = "text/html; charset=GBK";

//Initialize global variables
public void init() throws ServletException {
}

//Process the HTTP Get request
public void doGet(HttpServletRequest request, HttpServletResponse response) throws
ServletException, IOException {
response.setContentType(CONTENT_TYPE);

mapVersion _ver = new mapVersion();
_ver.setId(2);
_ver.setVersion("VerSion 2");
_ver.setPower(0);

System.out.println(_ver.getId());

System.out.println("Before Set ver!~");
System.out.println("$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$");

Session session = HIBERNATEUTIL.currentSession();

System.out.println("Before beginTransaction()!~");
System.out.println("#################################################");

Transaction tx = session.beginTransaction();

System.out.println("Before Save!~");
System.out.println("#################################################");
try{
session.save(_ver);
tx.commit();
System.out.println("After commit()!~");
System.out.println("#################################################");
session.close();
}
catch(HibernateException e){
System.out.println("Before rollback()!~");
System.out.println("#################################################");
e.printStackTrace() ;
tx.rollback();
session.close();
}

System.out.println("After rollback()!~");
System.out.println("#################################################");
}
//Clean up resources
public void destroy() {
}
}



作者 Re:HIBERNATE 初学者的 MS SQL Server 2000数据插入问题求教 [Re:casual]
casual





发贴: 10
积分: 0
于 2006-11-15 09:27 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
7)对应出现的错误提示:

C:\Borland\JBuilder2006\jdk1.5\bin\javaw -classpath "C:\jboss-4.0.4.GA\bin\run.jar;C:\Borland\JBuilder2006\jdk1.5\lib\tools.jar" -Djava.endorsed.dirs=C:/jboss-4.0.4.GA/lib/endorsed -Dprogram.name=run.bat -Xms128m -Xmx512m org.jboss.Main -c default
16:29:17,906 INFO [Server] Starting JBoss (MX MicroKernel)...
16:29:17,906 INFO [Server] Release ID: JBoss [Zion] 4.0.4.GA (build: CVSTag=JBoss_4_0_4_GA date=200605151000)
16:29:17,921 INFO [Server] Home Dir: C:\jboss-4.0.4.GA
16:29:17,921 INFO [Server] Home URL: file:/C:/jboss-4.0.4.GA/
16:29:17,921 INFO [Server] Patch URL: null
16:29:17,921 INFO [Server] Server Name: default
16:29:17,921 INFO [Server] Server Home Dir: C:\jboss-4.0.4.GA\server\default
16:29:17,921 INFO [Server] Server Home URL: file:/C:/jboss-4.0.4.GA/server/default/
16:29:17,921 INFO [Server] Server Log Dir: C:\jboss-4.0.4.GA\server\default\log
16:29:17,921 INFO [Server] Server Temp Dir: C:\jboss-4.0.4.GA\server\default\tmp
16:29:17,921 INFO [Server] Root Deployment Filename: jboss-service.xml
16:29:18,296 INFO [ServerInfo] Java version: 1.5.0_03,Sun Microsystems Inc.
16:29:18,296 INFO [ServerInfo] Java VM: Java HotSpot(TM) Client VM 1.5.0_03-b07,Sun Microsystems Inc.
16:29:18,296 INFO [ServerInfo] OS-System: Windows XP 5.1,x86
16:29:19,156 INFO [Server] Core system initialized
16:29:21,328 INFO [WebService] Using RMI server codebase: http://anshin:8083/
16:29:21,359 INFO [Log4jService$URLWatchTimerTask] Configuring from URL: resource:log4j.xml
16:29:21,750 INFO [NamingService] JNDI bootstrap JNP=/0.0.0.0:1099, RMI=/0.0.0.0:1098, backlog=50, no client SocketFactory, Server SocketFactory=class org.jboss.net.sockets.DefaultSocketFactory
16:29:25,218 INFO [Embedded] Catalina naming disabled
16:29:25,281 INFO [ClusterRuleSetFactory] Unable to find a cluster rule set in the classpath. Will load the default rule set.
16:29:25,281 INFO [ClusterRuleSetFactory] Unable to find a cluster rule set in the classpath. Will load the default rule set.
16:29:25,609 INFO [Http11BaseProtocol] Initializing Coyote HTTP/1.1 on http-0.0.0.0-8080
16:29:25,609 INFO [Catalina] Initialization processed in 328 ms
16:29:25,609 INFO [StandardService] Starting service jboss.web
16:29:25,609 INFO [StandardEngine] Starting Servlet Engine: Apache Tomcat/5.5.17
16:29:25,656 INFO [StandardHost] XML validation disabled
16:29:25,687 INFO [Catalina] Server startup in 78 ms
16:29:25,812 INFO [TomcatDeployer] deploy, ctxPath=/invoker, warUrl=.../deploy/http-invoker.sar/invoker.war/
16:29:26,265 INFO [WebappLoader] Dual registration of jndi stream handler: factory already defined
16:29:26,796 INFO [TomcatDeployer] deploy, ctxPath=/, warUrl=.../deploy/jbossweb-tomcat55.sar/ROOT.war/
16:29:27,546 INFO [TomcatDeployer] deploy, ctxPath=/jbossws, warUrl=.../tmp/deploy/tmp17020jbossws-exp.war/
16:29:27,750 INFO [SubscriptionManager] Bound event dispatcher to java:/EventDispatcher
16:29:27,953 INFO [TomcatDeployer] deploy, ctxPath=/jbossmq-httpil, warUrl=.../deploy/jms/jbossmq-httpil.sar/jbossmq-httpil.war/
16:29:30,281 INFO [TomcatDeployer] deploy, ctxPath=/web-console, warUrl=.../deploy/management/console-mgr.sar/web-console.war/
16:29:31,171 INFO [MailService] Mail Service bound to java:/Mail
16:29:31,406 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-ha-local-jdbc.rar
16:29:31,468 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-ha-xa-jdbc.rar
16:29:31,515 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-local-jdbc.rar
16:29:31,546 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-xa-jdbc.rar
16:29:31,578 ERROR [MainDeployer] Could not initialise deployment: file:/C:/jboss-4.0.4.GA/server/default/deploy/jbossjca-service.rar
org.jboss.deployment.DeploymentException: Could not find meta data META-INF/ra.xml for deployment file:/C:/jboss-4.0.4.GA/server/default/deploy/jbossjca-service.rar
  at org.jboss.deployment.SimpleSubDeployerSupport.getMetaDataResource(SimpleSubDeployerSupport.java:175)
  at org.jboss.deployment.SimpleSubDeployerSupport.init(SimpleSubDeployerSupport.java:87)
  at org.jboss.deployment.MainDeployer.init(MainDeployer.java:861)
  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:798)
  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
  at sun.reflect.GeneratedMethodAccessor55.invoke(Unknown Source)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:585)
  at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
  at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
  at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
  at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
  at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
  at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
  at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
  at $Proxy8.deploy(Unknown Source)
  at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
  at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
  at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
  at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336)
  at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
  at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
  at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:585)
  at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
  at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
  at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
  at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
  at $Proxy0.start(Unknown Source)
  at org.jboss.system.ServiceController.start(ServiceController.java:417)
  at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:585)
  at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
  at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
  at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
  at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
  at $Proxy4.start(Unknown Source)
  at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
  at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1007)
  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:808)
  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:755)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:585)
  at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
  at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
  at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
  at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
  at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
  at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
  at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
  at $Proxy5.deploy(Unknown Source)
  at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
  at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
  at org.jboss.Main.boot(Main.java:200)
  at org.jboss.Main$1.run(Main.java:464)
  at java.lang.Thread.run(Thread.java:595)
16:29:31,671 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jms/jms-ra.rar
16:29:31,718 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/mail-ra.rar
16:29:31,765 ERROR [MainDeployer] Could not initialise deployment: file:/C:/jboss-4.0.4.GA/server/default/deploy/sqlexception-service.rar
org.jboss.deployment.DeploymentException: Could not find meta data META-INF/ra.xml for deployment file:/C:/jboss-4.0.4.GA/server/default/deploy/sqlexception-service.rar
  at org.jboss.deployment.SimpleSubDeployerSupport.getMetaDataResource(SimpleSubDeployerSupport.java:175)
  at org.jboss.deployment.SimpleSubDeployerSupport.init(SimpleSubDeployerSupport.java:87)
  at org.jboss.deployment.MainDeployer.init(MainDeployer.java:861)
  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:798)
  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
  at sun.reflect.GeneratedMethodAccessor55.invoke(Unknown Source)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:585)
  at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
  at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
  at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
  at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
  at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
  at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
  at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
  at $Proxy8.deploy(Unknown Source)
  at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
  at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
  at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
  at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336)
  at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
  at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
  at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:585)
  at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
  at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
  at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
  at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
  at $Proxy0.start(Unknown Source)
  at org.jboss.system.ServiceController.start(ServiceController.java:417)
  at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:585)
  at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
  at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
  at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
  at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
  at $Proxy4.start(Unknown Source)
  at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
  at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1007)
  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:808)
  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:755)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:585)
  at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
  at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
  at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
  at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
  at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
  at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
  at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
  at $Proxy5.deploy(Unknown Source)
  at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
  at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
  at org.jboss.Main.boot(Main.java:200)
  at org.jboss.Main$1.run(Main.java:464)
  at java.lang.Thread.run(Thread.java:595)
16:29:32,812 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DefaultDS' to JNDI name 'javaBig SmileefaultDS'
16:29:33,062 INFO [A] Bound to JNDI name: queue/A
16:29:33,062 INFO [B] Bound to JNDI name: queue/B
16:29:33,062 INFO [C] Bound to JNDI name: queue/C
16:29:33,078 INFO [D] Bound to JNDI name: queue/D
16:29:33,078 INFO [ex] Bound to JNDI name: queue/ex
16:29:33,093 INFO [testTopic] Bound to JNDI name: topic/testTopic
16:29:33,093 INFO [securedTopic] Bound to JNDI name: topic/securedTopic
16:29:33,093 INFO [testDurableTopic] Bound to JNDI name: topic/testDurableTopic
16:29:33,093 INFO [testQueue] Bound to JNDI name: queue/testQueue
16:29:33,156 INFO [UILServerILService] JBossMQ UIL service available at : /0.0.0.0:8093
16:29:33,187 INFO [DLQ] Bound to JNDI name: queue/DLQ
16:29:33,359 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA' to JNDI name 'java:JmsXA'
16:29:33,453 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=JSQL_DS' to JNDI name 'java:JSQL_DS'
16:29:33,703 INFO [EjbModule] Deploying BookShop
16:29:33,843 INFO [ProxyFactory] Bound EJB Home 'BookShop' to jndi 'BookShop'
16:29:33,843 INFO [EJBDeployer] Deployed: file:/C:/jboss-4.0.4.GA/server/default/deploy/BookSessionBean.jar
16:29:33,968 INFO [EjbModule] Deploying Hello
16:29:34,000 INFO [ProxyFactory] Bound EJB Home 'Hello' to jndi 'Hello'
16:29:34,000 INFO [EJBDeployer] Deployed: file:/C:/jboss-4.0.4.GA/server/default/deploy/HelloWorld.jar
16:29:34,093 INFO [EjbModule] Deploying MONITOR
16:29:34,156 INFO [ProxyFactory] Bound EJB Home 'MONITOR' to jndi 'MONITOR'
16:29:34,156 INFO [EJBDeployer] Deployed: file:/C:/jboss-4.0.4.GA/server/default/deploy/MONITORMODULE.jar
16:29:35,750 INFO [TomcatDeployer] deploy, ctxPath=/SERVLETMODULE, warUrl=.../tmp/deploy/tmp17056SERVLETMODULE-exp.war/
16:29:36,312 INFO [TomcatDeployer] deploy, ctxPath=/Servlet, warUrl=.../tmp/deploy/tmp17057Servlet-exp.war/
16:29:36,531 INFO [TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=.../deploy/jmx-console.war/
16:29:36,828 INFO [TomcatDeployer] deploy, ctxPath=/yeah, warUrl=.../deploy/yeah.war/
16:29:36,953 ERROR [URLDeploymentScanner] Incomplete Deployment listing:

--- Incompletely deployed packages ---
org.jboss.deployment.DeploymentInfo@e23c56db { url=file:/C:/jboss-4.0.4.GA/server/default/deploy/jbossjca-service.rar }
deployer: org.jboss.resource.deployment.RARDeployer@46a55e
status: null
state: FAILED
watch: file:/C:/jboss-4.0.4.GA/server/default/deploy/jbossjca-service.rar
altDD: null
lastDeployed: 1163492971578
lastModified: 1163492971578
mbeans:

org.jboss.deployment.DeploymentInfo@5e5800b { url=file:/C:/jboss-4.0.4.GA/server/default/deploy/sqlexception-service.rar }
deployer: org.jboss.resource.deployment.RARDeployer@46a55e
status: null
state: FAILED
watch: file:/C:/jboss-4.0.4.GA/server/default/deploy/sqlexception-service.rar
altDD: null
lastDeployed: 1163492971765
lastModified: 1163492971750
mbeans:

16:29:37,156 INFO [Http11BaseProtocol] Starting Coyote HTTP/1.1 on http-0.0.0.0-8080
16:29:37,296 INFO [ChannelSocket] JK: ajp13 listening on /0.0.0.0:8009
16:29:37,312 INFO [JkMain] Jk running ID=0 time=0/47 config=null
16:29:37,343 INFO [Server] JBoss (MX MicroKernel) [4.0.4.GA (build: CVSTag=JBoss_4_0_4_GA date=200605151000)] Started in 19s:406ms
16:29:37,468 INFO [STDOUT] 2The Hibernate Test!!
16:29:37,468 INFO [STDOUT] Before Set ver!~
16:29:37,484 INFO [STDOUT] $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
16:29:37,531 INFO [STDOUT] 16:29:37,531 INFO [Environment] Hibernate 3.1 rc1
16:29:37,546 INFO [STDOUT] 16:29:37,546 INFO [Environment] hibernate.properties not found
16:29:37,546 INFO [STDOUT] 16:29:37,546 INFO [Environment] using CGLIB reflection optimizer
16:29:37,546 INFO [STDOUT] 16:29:37,546 INFO [Environment] using JDK 1.4 java.sql.Timestamp handling
16:29:37,687 INFO [STDOUT] 16:29:37,687 INFO [Configuration] configuring from resource: /hibernate.cfg.xml
16:29:37,687 INFO [STDOUT] 16:29:37,687 INFO [Configuration] Configuration resource: /hibernate.cfg.xml
16:29:37,781 INFO [STDOUT] 16:29:37,781 INFO [Configuration] Reading mappings from resource: mapSoftVersion.hbm.xml
16:29:37,890 INFO [STDOUT] 16:29:37,890 INFO [HbmBinder] Mapping class: monitor.sql.mapSoftVersion -> SoftVersion
16:29:37,921 INFO [STDOUT] 16:29:37,921 INFO [Configuration] Configured SessionFactory: null
16:29:37,921 INFO [STDOUT] 16:29:37,921 INFO [Configuration] processing extends queue
16:29:37,921 INFO [STDOUT] 16:29:37,921 INFO [Configuration] processing collection mappings
16:29:37,921 INFO [STDOUT] 16:29:37,921 INFO [Configuration] processing association property references
16:29:37,921 INFO [STDOUT] 16:29:37,921 INFO [Configuration] processing foreign key constraints
16:29:38,015 INFO [STDOUT] 16:29:38,015 INFO [DriverManagerConnectionProvider] Using Hibernate built-in connection pool (not for production use!)
16:29:38,015 INFO [STDOUT] 16:29:38,015 INFO [DriverManagerConnectionProvider] Hibernate connection pool size: 20
16:29:38,015 INFO [STDOUT] 16:29:38,015 INFO [DriverManagerConnectionProvider] autocommit mode: false
16:29:38,031 INFO [STDOUT] 16:29:38,031 INFO [DriverManagerConnectionProvider] using driver: com.microsoft.jdbc.sqlserver.SQLServerDriver at URL: jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=NET
16:29:38,031 INFO [STDOUT] 16:29:38,031 INFO [DriverManagerConnectionProvider] connection properties: {user=red, password=red}
16:29:38,468 INFO [STDOUT] 16:29:38,468 INFO [SettingsFactory] RDBMS: Microsoft SQL Server, version: Microsoft SQL Server 2000 - 8.00.2039 (Intel X86)
  May 3 2005 23:18:38
  Copyright Coffee 1988-2003 Microsoft Corporation
  Personal Edition on Windows NT 5.1 (Build 2600: Service Pack 2)
16:29:38,468 INFO [STDOUT] 16:29:38,468 INFO [SettingsFactory] JDBC driver: SQLServer, version: 2.2.0029
16:29:38,500 INFO [STDOUT] 16:29:38,500 INFO [Dialect] Using dialect: org.hibernate.dialect.MySQLDialect
16:29:38,515 INFO [STDOUT] 16:29:38,515 INFO [TransactionFactoryFactory] Transaction strategy: org.hibernate.transaction.JTATransactionFactory
16:29:38,515 INFO [STDOUT] 16:29:38,515 INFO [NamingHelper] JNDI InitialContext properties:{}
16:29:38,515 INFO [STDOUT] 16:29:38,515 INFO [TransactionManagerLookupFactory] No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
16:29:38,515 INFO [STDOUT] 16:29:38,515 INFO [TransactionManagerLookupFactory] No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
16:29:38,515 INFO [STDOUT] 16:29:38,515 INFO [SettingsFactory] Automatic flush during beforeCompletion(): disabled
16:29:38,515 INFO [STDOUT] 16:29:38,515 INFO [SettingsFactory] Automatic session close at end of transaction: disabled
16:29:38,515 INFO [STDOUT] 16:29:38,515 INFO [SettingsFactory] JDBC batch size: 5
16:29:38,531 INFO [STDOUT] 16:29:38,531 INFO [SettingsFactory] JDBC batch updates for versioned data: disabled
16:29:38,531 INFO [STDOUT] 16:29:38,531 INFO [SettingsFactory] Scrollable result sets: enabled
16:29:38,531 INFO [STDOUT] 16:29:38,531 INFO [SettingsFactory] JDBC3 getGeneratedKeys(): disabled
16:29:38,531 INFO [STDOUT] 16:29:38,531 INFO [SettingsFactory] JDBC result set fetch size: 25
16:29:38,531 INFO [STDOUT] 16:29:38,531 INFO [SettingsFactory] Connection release mode: null
16:29:38,531 INFO [STDOUT] 16:29:38,531 INFO [SettingsFactory] Maximum outer join fetch depth: 2
16:29:38,531 INFO [STDOUT] 16:29:38,531 INFO [SettingsFactory] Default batch fetch size: 1
16:29:38,531 INFO [STDOUT] 16:29:38,531 INFO [SettingsFactory] Generate SQL with comments: disabled
16:29:38,531 INFO [STDOUT] 16:29:38,531 INFO [SettingsFactory] Order SQL updates by primary key: disabled
16:29:38,531 INFO [STDOUT] 16:29:38,531 INFO [SettingsFactory] Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
16:29:38,531 INFO [STDOUT] 16:29:38,531 INFO [ASTQueryTranslatorFactory] Using ASTQueryTranslatorFactory
16:29:38,531 INFO [STDOUT] 16:29:38,531 INFO [SettingsFactory] Query language substitutions: {}
16:29:38,531 INFO [STDOUT] 16:29:38,531 INFO [SettingsFactory] Second-level cache: enabled
16:29:38,546 INFO [STDOUT] 16:29:38,531 INFO [SettingsFactory] Query cache: disabled
16:29:38,546 INFO [STDOUT] 16:29:38,546 INFO [SettingsFactory] Cache provider: org.hibernate.cache.EhCacheProvider
16:29:38,546 INFO [STDOUT] 16:29:38,546 INFO [SettingsFactory] Optimize cache for minimal puts: disabled
16:29:38,546 INFO [STDOUT] 16:29:38,546 INFO [SettingsFactory] Structured second-level cache entries: disabled
16:29:38,546 INFO [STDOUT] 16:29:38,546 INFO [SettingsFactory] Echoing all SQL to stdout
16:29:38,546 INFO [STDOUT] 16:29:38,546 INFO [SettingsFactory] Statistics: disabled
16:29:38,546 INFO [STDOUT] 16:29:38,546 INFO [SettingsFactory] Deleted entity synthetic identifier rollback: disabled
16:29:38,546 INFO [STDOUT] 16:29:38,546 INFO [SettingsFactory] Default entity-mode: POJO
16:29:38,734 INFO [STDOUT] 16:29:38,734 INFO [SessionFactoryImpl] building session factory
16:29:38,750 INFO [STDOUT] 16:29:38,750 WARN [Configurator] No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: jar:file:/C:/jboss-4.0.4.GA/server/default/tmp/deploy/tmp17056SERVLETMODULE-exp.war/WEB-INF/lib/ehcache-1.1.jar!/ehcache-failsafe.xml
16:29:39,156 INFO [STDOUT] 16:29:39,156 INFO [SessionFactoryObjectFactory] Not binding factory to JNDI, no JNDI name configured
16:29:39,156 INFO [STDOUT] 16:29:39,156 INFO [SessionFactoryImpl] Checking 0 named queries
16:29:39,203 INFO [STDOUT] Before beginTransaction()!~
16:29:39,203 INFO [STDOUT] #################################################
16:29:39,218 INFO [STDOUT] 16:29:39,218 ERROR [[verservlet]] Servlet.service() for servlet verservlet threw exception
java.lang.ClassCastException: org.jboss.tm.usertx.client.ServerVMClientUserTransaction
  at org.hibernate.transaction.JTATransaction.<init>(JTATransaction.java:60)
  at org.hibernate.transaction.JTATransactionFactory.createTransaction(JTATransactionFactory.java:53)
  at org.hibernate.jdbc.JDBCContext.getTransaction(JDBCContext.java:190)
  at org.hibernate.impl.SessionImpl.getTransaction(SessionImpl.java:1197)
  at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1204)
  at monitor.web.VerServlet.doGet(VerServlet.java:42)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
  at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
  at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
  at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
  at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
  at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
  at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
  at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
  at java.lang.Thread.run(Thread.java:595)



作者 Re:HIBERNATE 初学者的 MS SQL Server 2000数据插入问题求教 [Re:casual]
casual





发贴: 10
积分: 0
于 2006-11-15 09:27 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
8)我的Servlet调用类去掉事务[//Transaction tx = session.beginTransaction();]情况下[VerServlet]代码:

package monitor.web;

import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.util.*;
import sql.mapVersion;
import sql.HIBERNATEUTIL;
import org.hibernate.*;
import org.hibernate.cache.*;
import org.hibernate.cfg.*;
import org.hibernate.cache.*;

public class VerServlet extends HttpServlet {
private static final String CONTENT_TYPE = "text/html; charset=GBK";

//Initialize global variables
public void init() throws ServletException {
}

//Process the HTTP Get request
public void doGet(HttpServletRequest request, HttpServletResponse response) throws
ServletException, IOException {
response.setContentType(CONTENT_TYPE);

mapSoftVersion ver = new mapSoftVersion();
ver.setId(2);
ver.setVersion("VerSion1.1");
ver.setPower(2);

System.out.println(ver.getId());

System.out.println("Before Set ver!~");
System.out.println("$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$");

Session session = HIBERNATEUTIL.currentSession();

System.out.println("Before beginTransaction()!~");
System.out.println("#################################################");

//Transaction tx = session.beginTransaction();

System.out.println("Before Save!~");
System.out.println("#################################################");
try{
session.save(ver);
//tx.commit();
System.out.println("After commit()!~");
System.out.println("#################################################");
session.close();
}
catch(HibernateException e){
System.out.println("Before rollback()!~");
System.out.println("#################################################");
e.printStackTrace() ;
//tx.rollback();
session.close();
}

System.out.println("After rollback()!~");
System.out.println("#################################################");
}

//Clean up resources
public void destroy() {
}
}



作者 Re:HIBERNATE 初学者的 MS SQL Server 2000数据插入问题求教 [Re:casual]
casual





发贴: 10
积分: 0
于 2006-11-15 09:28 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
9)对应出现的错误提示:

C:\Borland\JBuilder2006\jdk1.5\bin\javaw -classpath "C:\jboss-4.0.4.GA\bin\run.jar;C:\Borland\JBuilder2006\jdk1.5\lib\tools.jar" -Djava.endorsed.dirs=C:/jboss-4.0.4.GA/lib/endorsed -Dprogram.name=run.bat -Xms128m -Xmx512m org.jboss.Main -c default
15:09:00,046 INFO [Server] Starting JBoss (MX MicroKernel)...
15:09:00,046 INFO [Server] Release ID: JBoss [Zion] 4.0.4.GA (build: CVSTag=JBoss_4_0_4_GA date=200605151000)
15:09:00,062 INFO [Server] Home Dir: C:\jboss-4.0.4.GA
15:09:00,062 INFO [Server] Home URL: file:/C:/jboss-4.0.4.GA/
15:09:00,062 INFO [Server] Patch URL: null
15:09:00,062 INFO [Server] Server Name: default
15:09:00,062 INFO [Server] Server Home Dir: C:\jboss-4.0.4.GA\server\default
15:09:00,062 INFO [Server] Server Home URL: file:/C:/jboss-4.0.4.GA/server/default/
15:09:00,140 INFO [Server] Server Log Dir: C:\jboss-4.0.4.GA\server\default\log
15:09:00,140 INFO [Server] Server Temp Dir: C:\jboss-4.0.4.GA\server\default\tmp
15:09:00,140 INFO [Server] Root Deployment Filename: jboss-service.xml
15:09:00,593 INFO [ServerInfo] Java version: 1.5.0_03,Sun Microsystems Inc.
15:09:00,593 INFO [ServerInfo] Java VM: Java HotSpot(TM) Client VM 1.5.0_03-b07,Sun Microsystems Inc.
15:09:00,593 INFO [ServerInfo] OS-System: Windows XP 5.1,x86
15:09:01,609 INFO [Server] Core system initialized
15:09:04,828 INFO [WebService] Using RMI server codebase: http://anshin:8083/
15:09:04,890 INFO [Log4jService$URLWatchTimerTask] Configuring from URL: resource:log4j.xml
15:09:05,421 INFO [NamingService] JNDI bootstrap JNP=/0.0.0.0:1099, RMI=/0.0.0.0:1098, backlog=50, no client SocketFactory, Server SocketFactory=class org.jboss.net.sockets.DefaultSocketFactory
15:09:09,796 INFO [Embedded] Catalina naming disabled
15:09:09,859 INFO [ClusterRuleSetFactory] Unable to find a cluster rule set in the classpath. Will load the default rule set.
15:09:09,859 INFO [ClusterRuleSetFactory] Unable to find a cluster rule set in the classpath. Will load the default rule set.
15:09:10,250 INFO [Http11BaseProtocol] Initializing Coyote HTTP/1.1 on http-0.0.0.0-8080
15:09:10,250 INFO [Catalina] Initialization processed in 391 ms
15:09:10,250 INFO [StandardService] Starting service jboss.web
15:09:10,250 INFO [StandardEngine] Starting Servlet Engine: Apache Tomcat/5.5.17
15:09:10,312 INFO [StandardHost] XML validation disabled
15:09:10,343 INFO [Catalina] Server startup in 93 ms
15:09:10,500 INFO [TomcatDeployer] deploy, ctxPath=/invoker, warUrl=.../deploy/http-invoker.sar/invoker.war/
15:09:11,031 INFO [WebappLoader] Dual registration of jndi stream handler: factory already defined
15:09:11,718 INFO [TomcatDeployer] deploy, ctxPath=/, warUrl=.../deploy/jbossweb-tomcat55.sar/ROOT.war/
15:09:12,750 INFO [TomcatDeployer] deploy, ctxPath=/jbossws, warUrl=.../tmp/deploy/tmp12453jbossws-exp.war/
15:09:13,062 INFO [SubscriptionManager] Bound event dispatcher to java:/EventDispatcher
15:09:13,328 INFO [TomcatDeployer] deploy, ctxPath=/jbossmq-httpil, warUrl=.../deploy/jms/jbossmq-httpil.sar/jbossmq-httpil.war/
15:09:15,890 INFO [TomcatDeployer] deploy, ctxPath=/web-console, warUrl=.../deploy/management/console-mgr.sar/web-console.war/
15:09:16,953 INFO [MailService] Mail Service bound to java:/Mail
15:09:17,218 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-ha-local-jdbc.rar
15:09:17,281 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-ha-xa-jdbc.rar
15:09:17,328 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-local-jdbc.rar
15:09:17,375 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-xa-jdbc.rar
15:09:17,406 ERROR [MainDeployer] Could not initialise deployment: file:/C:/jboss-4.0.4.GA/server/default/deploy/jbossjca-service.rar
org.jboss.deployment.DeploymentException: Could not find meta data META-INF/ra.xml for deployment file:/C:/jboss-4.0.4.GA/server/default/deploy/jbossjca-service.rar
  at org.jboss.deployment.SimpleSubDeployerSupport.getMetaDataResource(SimpleSubDeployerSupport.java:175)
  at org.jboss.deployment.SimpleSubDeployerSupport.init(SimpleSubDeployerSupport.java:87)
  at org.jboss.deployment.MainDeployer.init(MainDeployer.java:861)
  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:798)
  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
  at sun.reflect.GeneratedMethodAccessor55.invoke(Unknown Source)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:585)
  at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
  at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
  at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
  at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
  at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
  at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
  at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
  at $Proxy8.deploy(Unknown Source)
  at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
  at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
  at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
  at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336)
  at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
  at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
  at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:585)
  at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
  at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
  at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
  at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
  at $Proxy0.start(Unknown Source)
  at org.jboss.system.ServiceController.start(ServiceController.java:417)
  at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:585)
  at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
  at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
  at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
  at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
  at $Proxy4.start(Unknown Source)
  at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
  at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1007)
  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:808)
  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:755)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:585)
  at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
  at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
  at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
  at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
  at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
  at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
  at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
  at $Proxy5.deploy(Unknown Source)
  at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
  at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
  at org.jboss.Main.boot(Main.java:200)
  at org.jboss.Main$1.run(Main.java:464)
  at java.lang.Thread.run(Thread.java:595)
15:09:17,500 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jms/jms-ra.rar
15:09:17,546 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/mail-ra.rar
15:09:17,593 ERROR [MainDeployer] Could not initialise deployment: file:/C:/jboss-4.0.4.GA/server/default/deploy/sqlexception-service.rar
org.jboss.deployment.DeploymentException: Could not find meta data META-INF/ra.xml for deployment file:/C:/jboss-4.0.4.GA/server/default/deploy/sqlexception-service.rar
  at org.jboss.deployment.SimpleSubDeployerSupport.getMetaDataResource(SimpleSubDeployerSupport.java:175)
  at org.jboss.deployment.SimpleSubDeployerSupport.init(SimpleSubDeployerSupport.java:87)
  at org.jboss.deployment.MainDeployer.init(MainDeployer.java:861)
  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:798)
  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
  at sun.reflect.GeneratedMethodAccessor55.invoke(Unknown Source)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:585)
  at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
  at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
  at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
  at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
  at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
  at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
  at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
  at $Proxy8.deploy(Unknown Source)
  at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
  at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
  at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
  at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336)
  at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
  at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
  at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:585)
  at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
  at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
  at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
  at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
  at $Proxy0.start(Unknown Source)
  at org.jboss.system.ServiceController.start(ServiceController.java:417)
  at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:585)
  at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
  at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
  at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
  at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
  at $Proxy4.start(Unknown Source)
  at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
  at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1007)
  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:808)
  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:755)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:585)
  at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
  at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
  at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
  at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
  at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
  at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
  at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
  at $Proxy5.deploy(Unknown Source)
  at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
  at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
  at org.jboss.Main.boot(Main.java:200)
  at org.jboss.Main$1.run(Main.java:464)
  at java.lang.Thread.run(Thread.java:595)
15:09:18,875 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DefaultDS' to JNDI name 'javaBig SmileefaultDS'
15:09:19,156 INFO [A] Bound to JNDI name: queue/A
15:09:19,156 INFO [B] Bound to JNDI name: queue/B
15:09:19,156 INFO [C] Bound to JNDI name: queue/C
15:09:19,156 INFO [D] Bound to JNDI name: queue/D
15:09:19,156 INFO [ex] Bound to JNDI name: queue/ex
15:09:19,187 INFO [testTopic] Bound to JNDI name: topic/testTopic
15:09:19,187 INFO [securedTopic] Bound to JNDI name: topic/securedTopic
15:09:19,187 INFO [testDurableTopic] Bound to JNDI name: topic/testDurableTopic
15:09:19,187 INFO [testQueue] Bound to JNDI name: queue/testQueue
15:09:19,265 INFO [UILServerILService] JBossMQ UIL service available at : /0.0.0.0:8093
15:09:19,312 INFO [DLQ] Bound to JNDI name: queue/DLQ
15:09:19,515 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA' to JNDI name 'java:JmsXA'
15:09:19,625 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=JSQL_DS' to JNDI name 'java:JSQL_DS'
15:09:19,890 INFO [EjbModule] Deploying BookShop
15:09:20,062 INFO [ProxyFactory] Bound EJB Home 'BookShop' to jndi 'BookShop'
15:09:20,062 INFO [EJBDeployer] Deployed: file:/C:/jboss-4.0.4.GA/server/default/deploy/BookSessionBean.jar
15:09:20,187 INFO [EjbModule] Deploying Hello
15:09:20,234 INFO [ProxyFactory] Bound EJB Home 'Hello' to jndi 'Hello'
15:09:20,234 INFO [EJBDeployer] Deployed: file:/C:/jboss-4.0.4.GA/server/default/deploy/HelloWorld.jar
15:09:20,343 INFO [EjbModule] Deploying MONITOR
15:09:20,390 INFO [ProxyFactory] Bound EJB Home 'MONITOR' to jndi 'MONITOR'
15:09:20,390 INFO [EJBDeployer] Deployed: file:/C:/jboss-4.0.4.GA/server/default/deploy/MONITORMODULE.jar
15:09:21,968 INFO [TomcatDeployer] deploy, ctxPath=/SERVLETMODULE, warUrl=.../tmp/deploy/tmp12489SERVLETMODULE-exp.war/
15:09:22,921 INFO [TomcatDeployer] deploy, ctxPath=/Servlet, warUrl=.../tmp/deploy/tmp12490Servlet-exp.war/
15:09:23,187 INFO [TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=.../deploy/jmx-console.war/
15:09:23,453 INFO [TomcatDeployer] deploy, ctxPath=/yeah, warUrl=.../deploy/yeah.war/
15:09:23,593 ERROR [URLDeploymentScanner] Incomplete Deployment listing:

--- Incompletely deployed packages ---
org.jboss.deployment.DeploymentInfo@e23c56db { url=file:/C:/jboss-4.0.4.GA/server/default/deploy/jbossjca-service.rar }
deployer: org.jboss.resource.deployment.RARDeployer@3c35fd
status: null
state: FAILED
watch: file:/C:/jboss-4.0.4.GA/server/default/deploy/jbossjca-service.rar
altDD: null
lastDeployed: 1163488157406
lastModified: 1163488157390
mbeans:

org.jboss.deployment.DeploymentInfo@5e5800b { url=file:/C:/jboss-4.0.4.GA/server/default/deploy/sqlexception-service.rar }
deployer: org.jboss.resource.deployment.RARDeployer@3c35fd
status: null
state: FAILED
watch: file:/C:/jboss-4.0.4.GA/server/default/deploy/sqlexception-service.rar
altDD: null
lastDeployed: 1163488157593
lastModified: 1163488157593
mbeans:

15:09:23,781 INFO [Http11BaseProtocol] Starting Coyote HTTP/1.1 on http-0.0.0.0-8080
15:09:23,937 INFO [ChannelSocket] JK: ajp13 listening on /0.0.0.0:8009
15:09:23,953 INFO [JkMain] Jk running ID=0 time=0/78 config=null
15:09:23,968 INFO [Server] JBoss (MX MicroKernel) [4.0.4.GA (build: CVSTag=JBoss_4_0_4_GA date=200605151000)] Started in 23s:828ms
15:09:24,203 INFO [STDOUT] 2The Hibernate Test!!
15:09:24,203 INFO [STDOUT] Before Set ver!~
15:09:24,203 INFO [STDOUT] $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
15:09:24,250 INFO [STDOUT] 15:09:24,250 INFO [Environment] Hibernate 3.1 rc1
15:09:24,265 INFO [STDOUT] 15:09:24,265 INFO [Environment] hibernate.properties not found
15:09:24,265 INFO [STDOUT] 15:09:24,265 INFO [Environment] using CGLIB reflection optimizer
15:09:24,265 INFO [STDOUT] 15:09:24,265 INFO [Environment] using JDK 1.4 java.sql.Timestamp handling
15:09:24,437 INFO [STDOUT] 15:09:24,437 INFO [Configuration] configuring from resource: /hibernate.cfg.xml
15:09:24,437 INFO [STDOUT] 15:09:24,437 INFO [Configuration] Configuration resource: /hibernate.cfg.xml
15:09:24,546 INFO [STDOUT] 15:09:24,546 INFO [Configuration] Reading mappings from resource: mapSoftVersion.hbm.xml
15:09:24,656 INFO [STDOUT] 15:09:24,656 INFO [HbmBinder] Mapping class: monitor.sql.mapSoftVersion -> SoftVersion
15:09:24,687 INFO [STDOUT] 15:09:24,687 INFO [Configuration] Configured SessionFactory: null
15:09:24,687 INFO [STDOUT] 15:09:24,687 INFO [Configuration] processing extends queue
15:09:24,687 INFO [STDOUT] 15:09:24,687 INFO [Configuration] processing collection mappings
15:09:24,687 INFO [STDOUT] 15:09:24,687 INFO [Configuration] processing association property references
15:09:24,687 INFO [STDOUT] 15:09:24,687 INFO [Configuration] processing foreign key constraints
15:09:24,796 INFO [STDOUT] 15:09:24,796 INFO [DriverManagerConnectionProvider] Using Hibernate built-in connection pool (not for production use!)
15:09:24,796 INFO [STDOUT] 15:09:24,796 INFO [DriverManagerConnectionProvider] Hibernate connection pool size: 20
15:09:24,796 INFO [STDOUT] 15:09:24,796 INFO [DriverManagerConnectionProvider] autocommit mode: false
15:09:24,796 INFO [STDOUT] 15:09:24,796 INFO [DriverManagerConnectionProvider] using driver: com.microsoft.jdbc.sqlserver.SQLServerDriver at URL: jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=NET
15:09:24,796 INFO [STDOUT] 15:09:24,796 INFO [DriverManagerConnectionProvider] connection properties: {user=red, password=red}
15:09:25,312 INFO [STDOUT] 15:09:25,312 INFO [SettingsFactory] RDBMS: Microsoft SQL Server, version: Microsoft SQL Server 2000 - 8.00.2039 (Intel X86)
  May 3 2005 23:18:38
  Copyright Coffee 1988-2003 Microsoft Corporation
  Personal Edition on Windows NT 5.1 (Build 2600: Service Pack 2)
15:09:25,312 INFO [STDOUT] 15:09:25,312 INFO [SettingsFactory] JDBC driver: SQLServer, version: 2.2.0029
15:09:25,359 INFO [STDOUT] 15:09:25,359 INFO [Dialect] Using dialect: org.hibernate.dialect.MySQLDialect
15:09:25,359 INFO [STDOUT] 15:09:25,359 INFO [TransactionFactoryFactory] Transaction strategy: org.hibernate.transaction.JTATransactionFactory
15:09:25,375 INFO [STDOUT] 15:09:25,375 INFO [NamingHelper] JNDI InitialContext properties:{}
15:09:25,375 INFO [STDOUT] 15:09:25,375 INFO [TransactionManagerLookupFactory] No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
15:09:25,375 INFO [STDOUT] 15:09:25,375 INFO [TransactionManagerLookupFactory] No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
15:09:25,375 INFO [STDOUT] 15:09:25,375 INFO [SettingsFactory] Automatic flush during beforeCompletion(): disabled
15:09:25,375 INFO [STDOUT] 15:09:25,375 INFO [SettingsFactory] Automatic session close at end of transaction: disabled
15:09:25,375 INFO [STDOUT] 15:09:25,375 INFO [SettingsFactory] JDBC batch size: 5
15:09:25,375 INFO [STDOUT] 15:09:25,375 INFO [SettingsFactory] JDBC batch updates for versioned data: disabled
15:09:25,375 INFO [STDOUT] 15:09:25,375 INFO [SettingsFactory] Scrollable result sets: enabled
15:09:25,390 INFO [STDOUT] 15:09:25,390 INFO [SettingsFactory] JDBC3 getGeneratedKeys(): disabled
15:09:25,390 INFO [STDOUT] 15:09:25,390 INFO [SettingsFactory] JDBC result set fetch size: 25
15:09:25,390 INFO [STDOUT] 15:09:25,390 INFO [SettingsFactory] Connection release mode: null
15:09:25,390 INFO [STDOUT] 15:09:25,390 INFO [SettingsFactory] Maximum outer join fetch depth: 2
15:09:25,390 INFO [STDOUT] 15:09:25,390 INFO [SettingsFactory] Default batch fetch size: 1
15:09:25,390 INFO [STDOUT] 15:09:25,390 INFO [SettingsFactory] Generate SQL with comments: disabled
15:09:25,390 INFO [STDOUT] 15:09:25,390 INFO [SettingsFactory] Order SQL updates by primary key: disabled
15:09:25,390 INFO [STDOUT] 15:09:25,390 INFO [SettingsFactory] Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
15:09:25,390 INFO [STDOUT] 15:09:25,390 INFO [ASTQueryTranslatorFactory] Using ASTQueryTranslatorFactory
15:09:25,390 INFO [STDOUT] 15:09:25,390 INFO [SettingsFactory] Query language substitutions: {}
15:09:25,390 INFO [STDOUT] 15:09:25,390 INFO [SettingsFactory] Second-level cache: enabled
15:09:25,406 INFO [STDOUT] 15:09:25,406 INFO [SettingsFactory] Query cache: disabled
15:09:25,406 INFO [STDOUT] 15:09:25,406 INFO [SettingsFactory] Cache provider: org.hibernate.cache.EhCacheProvider
15:09:25,406 INFO [STDOUT] 15:09:25,406 INFO [SettingsFactory] Optimize cache for minimal puts: disabled
15:09:25,406 INFO [STDOUT] 15:09:25,406 INFO [SettingsFactory] Structured second-level cache entries: disabled
15:09:25,406 INFO [STDOUT] 15:09:25,406 INFO [SettingsFactory] Echoing all SQL to stdout
15:09:25,406 INFO [STDOUT] 15:09:25,406 INFO [SettingsFactory] Statistics: disabled
15:09:25,406 INFO [STDOUT] 15:09:25,406 INFO [SettingsFactory] Deleted entity synthetic identifier rollback: disabled
15:09:25,406 INFO [STDOUT] 15:09:25,406 INFO [SettingsFactory] Default entity-mode: POJO
15:09:25,625 INFO [STDOUT] 15:09:25,625 INFO [SessionFactoryImpl] building session factory
15:09:25,640 INFO [STDOUT] 15:09:25,640 WARN [Configurator] No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: jar:file:/C:/jboss-4.0.4.GA/server/default/tmp/deploy/tmp12489SERVLETMODULE-exp.war/WEB-INF/lib/ehcache-1.1.jar!/ehcache-failsafe.xml
15:09:26,078 INFO [STDOUT] 15:09:26,078 INFO [SessionFactoryObjectFactory] Not binding factory to JNDI, no JNDI name configured
15:09:26,078 INFO [STDOUT] 15:09:26,078 INFO [SessionFactoryImpl] Checking 0 named queries
15:09:26,156 INFO [STDOUT] Before beginTransaction()!~
15:09:26,156 INFO [STDOUT] #################################################
15:09:26,156 INFO [STDOUT] Before Save!~
15:09:26,156 INFO [STDOUT] #################################################
15:09:26,171 INFO [STDOUT] Hibernate: insert into SoftVersion (_softVersion, _softPower, _softDesc) values (?, ?, ?)
15:09:26,296 INFO [STDOUT] Hibernate: select last_insert_id()
15:09:26,359 INFO [STDOUT] 15:09:26,359 WARN [JDBCExceptionReporter] SQL Error: 195, SQLState: HY000
15:09:26,359 INFO [STDOUT] 15:09:26,359 ERROR [JDBCExceptionReporter] [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]'last_insert_id' 不是可以识别的 函数名。
15:09:26,359 INFO [STDOUT] Before rollback()!~
15:09:26,359 INFO [STDOUT] #################################################
15:09:26,375 ERROR [STDERR] org.hibernate.exception.GenericJDBCException: could not insert: [monitor.sql.mapSoftVersion]
  at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:91)
  at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:79)
  at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
  at org.hibernate.id.AbstractPostInsertGenerator.getGenerated(AbstractPostInsertGenerator.java:56)
  at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:1993)
  at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2404)
  at org.hibernate.action.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:37)
  at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:243)
  at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:269)
  at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:167)
  at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:101)
  at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:186)
  at org.hibernate.event.def.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:33)
  at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:175)
  at org.hibernate.event.def.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:27)
  at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:70)
  at org.hibernate.impl.SessionImpl.fireSave(SessionImpl.java:523)
  at org.hibernate.impl.SessionImpl.save(SessionImpl.java:513)
  at org.hibernate.impl.SessionImpl.save(SessionImpl.java:509)
  at monitor.web.VerServlet.doGet(VerServlet.java:48)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
  at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
  at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
  at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
  at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
  at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
  at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
  at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
  at java.lang.Thread.run(Thread.java:595)
Caused by: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]'last_insert_id' 不是可以识别的 函数名。
  at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source)
  at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
  at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processErrorToken(Unknown Source)
  at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processReplyToken(Unknown Source)
  at com.microsoft.jdbc.sqlserver.tds.TDSExecuteRequest.processReplyToken(Unknown Source)
  at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processReply(Unknown Source)
  at com.microsoft.jdbc.sqlserver.SQLServerImplStatement.getNextResultType(Unknown Source)
  at com.microsoft.jdbc.base.BaseStatement.commonTransitionToState(Unknown Source)
  at com.microsoft.jdbc.base.BaseStatement.postImplExecute(Unknown Source)
  at com.microsoft.jdbc.base.BasePreparedStatement.postImplExecute(Unknown Source)
  at com.microsoft.jdbc.base.BaseStatement.commonExecute(Unknown Source)
  at com.microsoft.jdbc.base.BaseStatement.executeQueryInternal(Unknown Source)
  at com.microsoft.jdbc.base.BasePreparedStatement.executeQuery(Unknown Source)
  at org.hibernate.id.AbstractPostInsertGenerator.getGenerated(AbstractPostInsertGenerator.java:42)
  ... 36 more
15:09:26,390 INFO [STDOUT] 15:09:26,390 WARN [JDBCExceptionReporter] SQL Warning: 0, SQLState:
15:09:26,390 INFO [STDOUT] 15:09:26,390 WARN [JDBCExceptionReporter] [Microsoft][SQLServer 2000 Driver for JDBC]Database changed to NET
15:09:26,390 INFO [STDOUT] 15:09:26,390 WARN [JDBCExceptionReporter] SQL Warning: 0, SQLState:
15:09:26,390 INFO [STDOUT] 15:09:26,390 WARN [JDBCExceptionReporter] [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]已将数据库上下文改为 'NET'。
15:09:26,390 INFO [STDOUT] 15:09:26,390 WARN [JDBCExceptionReporter] SQL Warning: 0, SQLState:
15:09:26,390 INFO [STDOUT] 15:09:26,390 WARN [JDBCExceptionReporter] [Microsoft][SQLServer 2000 Driver for JDBC]Language changed to 简体中文
15:09:26,390 INFO [STDOUT] 15:09:26,390 WARN [JDBCExceptionReporter] SQL Warning: 0, SQLState:
15:09:26,390 INFO [STDOUT] 15:09:26,390 WARN [JDBCExceptionReporter] [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]已将语言设置改为 简体中文。
15:09:26,390 INFO [STDOUT] After rollback()!~
15:09:26,390 INFO [STDOUT] #################################################



作者 Re:HIBERNATE 初学者的 MS SQL Server 2000数据插入问题求教 [Re:casual]
casual





发贴: 10
积分: 0
于 2006-11-15 09:29 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
不知道是什么地方错误,难道我的jboss-service也需要配置吗?或者其它的地方我没有注意到?特别我想知道一部份是S  QL Server 2000中的关键字ID怎样通过Hibernate插入,因为自增加只有在MySql中可以[increment],在SQL Server 2000中怎么办[native]?对应怎样设置?


作者 Re:HIBERNATE 初学者的 MS SQL Server 2000数据插入问题求教 [Re:casual]
lixj0571





发贴: 84
积分: 2
于 2006-11-17 21:36 user profilesend a private message to usersend email to lixj0571search all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
<property name="dialect">org.hibernate.dialect.MySQLDialect</property>
这是问题的所在,你配置成mysql的dialect了,sqlserver中也有increment的



作者 Re:HIBERNATE 初学者的 MS SQL Server 2000数据插入问题求教 [Re:casual]
lixj0571





发贴: 84
积分: 2
于 2006-11-17 21:40 user profilesend a private message to usersend email to lixj0571search all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
<property name="dialect">org.hibernate.dialect.MySQLDialect</property>
这是问题的所在,你配置成mysql的dialect了,sqlserver中也有increment的
另外:你使用的hibernate3.1了,就不需要自己写HibernateUtil用来管理session了
可以直接通过调用SessionFactory.currentSession()就可以了




flat modethreaded modego to previous topicgo to next topicgo to back
  已读帖子
  新的帖子
  被删除的帖子
Jump to the top of page

   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923