EmForge with SQL Server 2005

3 views
Skip to first unread message

Kalyan

unread,
Aug 20, 2009, 10:01:47 AM8/20/09
to EmForge
I downloaded and installed Emforge using MSI installer. I would like
to use MS SQL Server 2005 and below are the changes, I did to
config.properties.

datasource.schema=
datasource.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
datasource.dialect=org.hibernate.dialect.SQLServerDialect
datasource.preferredTestQuery=select 1
datasource.url=jdbc:sqlserver://localhost:
1433;databaseName=emforge;user=emforge;password=emforge
datasource.username=sa
datasource.password=*******

I copied sqljdbc.jar file to WEB-INF\lib directory of webapp.

Emforge Service didn't startup successfully. I verified the log file
and it seems to be a timeout error while building hibernate session
factory. Below are the contents of jetty-service.log. After several
retires, service died with failure.

STATUS | wrapper | 2009/08/20 19:23:38 | Launching a JVM...
INFO | jvm 5 | 2009/08/20 19:23:38 | Wrapper (Version 3.2.0)
http://wrapper.tanukisoftware.org
INFO | jvm 5 | 2009/08/20 19:23:38 |
INFO | jvm 5 | 2009/08/20 19:23:38 | WARNING - The Wrapper jar
file currently in use is version "3.2.0"
INFO | jvm 5 | 2009/08/20 19:23:38 | while the version
of the Wrapper which launched this JVM is
INFO | jvm 5 | 2009/08/20 19:23:38 | "3.2.3".
INFO | jvm 5 | 2009/08/20 19:23:38 | The Wrapper may
appear to work correctly but some features may
INFO | jvm 5 | 2009/08/20 19:23:38 | not function
correctly. This configuration has not been tested
INFO | jvm 5 | 2009/08/20 19:23:38 | and is not
supported.
INFO | jvm 5 | 2009/08/20 19:23:38 |
INFO | jvm 5 | 2009/08/20 19:23:38 | WARNING - The Wrapper jar
file currently in use is version "3.2.0"
INFO | jvm 5 | 2009/08/20 19:23:38 | while the version
of the native library is "3.2.3".
INFO | jvm 5 | 2009/08/20 19:23:38 | The Wrapper may
appear to work correctly but some features may
INFO | jvm 5 | 2009/08/20 19:23:38 | not function
correctly. This configuration has not been tested
INFO | jvm 5 | 2009/08/20 19:23:38 | and is not
supported.
INFO | jvm 5 | 2009/08/20 19:23:38 |
INFO | jvm 5 | 2009/08/20 19:23:38 | ARG[0] = ./etc/jetty-win32-
service.xml
INFO | jvm 5 | 2009/08/20 19:23:38 | ARG[1] = ./etc/jetty.xml
INFO | jvm 5 | 2009/08/20 19:23:38 | 2009-08-20
19:23:38.774::INFO: Logging to STDERR via org.mortbay.log.StdErrLog
INFO | jvm 5 | 2009/08/20 19:23:39 | 2009-08-20
19:23:38.994::INFO: jetty-6.1.18
INFO | jvm 5 | 2009/08/20 19:23:39 | 2009-08-20
19:23:39.395::INFO: NO JSP Support for , did not find
org.apache.jasper.servlet.JspServlet
INFO | jvm 5 | 2009/08/20 19:23:41 | Aug 20, 2009 7:23:40 PM
com.sun.faces.config.ConfigureListener contextInitialized
INFO | jvm 5 | 2009/08/20 19:23:41 | INFO: Initializing Mojarra
(1.2_10-b01-FCS) for context ''
INFO | jvm 5 | 2009/08/20 19:23:42 | Aug 20, 2009 7:23:42 PM
com.sun.faces.spi.InjectionProviderFactory createInstance
INFO | jvm 5 | 2009/08/20 19:23:42 | WARNING: JSF1033: Resource
injection is DISABLED.
INFO | jvm 5 | 2009/08/20 19:23:43 | 2009-08-20
19:23:43.211::INFO: Initializing Spring root WebApplicationContext
INFO | jvm 5 | 2009/08/20 19:23:45 | [EmForge]: [2009-08-20
19:23:44,983] WARN
org.springframework.beans.factory.config.PropertyPlaceholderConfigurer
- Could not load properties from class path resource [config-
user.properties]: class path resource [config-user.properties] cannot
be opened because it does not exist
INFO | jvm 5 | 2009/08/20 19:23:47 | [EmForge]: [2009-08-20
19:23:47,346] INFO
org.emforge.upgrademanager.UpgradableSessionFactory - Building new
Hibernate SessionFactory
ERROR | wrapper | 2009/08/20 19:24:09 | Startup failed: Timed out
waiting for signal from JVM.
ERROR | wrapper | 2009/08/20 19:24:09 | JVM did not exit on request,
terminated
FATAL | wrapper | 2009/08/20 19:24:10 | There were 5 failed launches
in a row, each lasting less than 300 seconds. Giving up.
FATAL | wrapper | 2009/08/20 19:24:10 | There may be a
configuration problem: please check the logs.
STATUS | wrapper | 2009/08/20 19:24:10 | <-- Wrapper Stopped

Help appreciated.

Thanks
Kalyan

Alvaro Pagliari

unread,
Aug 20, 2009, 10:34:54 AM8/20/09
to emf...@googlegroups.com
Hello Kalyan, I don´t have EmForge installed with SQL Server, but I already used SQL Server with Hibernate and the microsoft driver is really bad with it, many functions are not implemented. Try to use this driver... http://jtds.sourceforge.net/ it worked for me...

Configuration

<property name="hibernate.connection.driver_class">net.sourceforge.jtds.jdbc.Driver</property>
<property name="hibernate.connection.password">password</property>
<property name="hibernate.connection.url">jdbc:jtds:sqlserver://server:1433/DATABASE</property>
<property name="hibernate.connection.username">USER</property>
<property name="hibernate.dialect">org.hibernate.dialect.SQLServerDialect</property>

P.S.: Sorry for my poor english!

--
Álvaro Gianni Pagliari
alvaropag [at] gmail [dot] com
GetGames

Kalyan

unread,
Aug 20, 2009, 11:01:22 AM8/20/09
to EmForge
Thanks for your response. BTW, Your English is not at all bad.

Same issue with jTDS as well. I believe it is not a problem with JDBC
Drivers.

Using SQL Server Management Studio, I am able to login successfully. I
tried with server name values as localhost, [local], <my hostname>and
IP Address. But with hibernate, it times out after 30 seconds. This is
too less a timeout period, I believe. I am not sure how could I
increase the timeout of the service wrapper. I turned on logging with
DEBUG as severity and I got some additional log messages. But I
couldn't able to make out the actual problem.

STATUS | wrapper | 2009/08/20 20:22:07 | Launching a JVM...
DEBUG | wrapper | 2009/08/20 20:22:07 | command: "C:\WINDOWS
\system32\java.exe" -Djetty.home=./ -Djetty.logs=./logs -
Dcatalina.base=. -Xms16m -Xmx256m -Djava.library.path="lib" -classpath
"lib/jetty-6.1.18.jar;lib/jetty-util-6.1.18.jar;lib/jetty-win32-
service-java-6.1.18.jar;lib/servlet-api-2.5-20081211.jar;lib/
start-6.1.18.jar;lib/wrapper-3.2.0.jar" -
Dwrapper.key="5R4r2psj_WlvX_IL" -Dwrapper.port=32000 -
Dwrapper.jvm.port.min=31000 -Dwrapper.jvm.port.max=31999 -
Dwrapper.debug="TRUE" -Dwrapper.pid=3284 -Dwrapper.version="3.2.3" -
Dwrapper.native_library="wrapper" -Dwrapper.service="TRUE" -
Dwrapper.cpu.timeout="10" -Dwrapper.jvmid=5
org.mortbay.jetty.win32service.JettyServiceWrapperListener ./etc/
jetty.xml
DEBUG | wrapper | 2009/08/20 20:22:07 | JVM started (PID=4000)
INFO | jvm 5 | 2009/08/20 20:22:08 | WrapperManager class
initialized by thread: main Using classloader: sun.misc.Launcher
$AppClassLoader@133056f
INFO | jvm 5 | 2009/08/20 20:22:08 | Wrapper (Version 3.2.0)
http://wrapper.tanukisoftware.org
INFO | jvm 5 | 2009/08/20 20:22:08 |
INFO | jvm 5 | 2009/08/20 20:22:08 | Wrapper Manager: JVM #5
INFO | jvm 5 | 2009/08/20 20:22:08 | Running a 32-bit JVM.
INFO | jvm 5 | 2009/08/20 20:22:08 | Wrapper Manager: Registering
shutdown hook
INFO | jvm 5 | 2009/08/20 20:22:08 | Wrapper Manager: Using
wrapper
INFO | jvm 5 | 2009/08/20 20:22:08 | WARNING - The Wrapper jar
file currently in use is version "3.2.0"
INFO | jvm 5 | 2009/08/20 20:22:08 | while the version
of the Wrapper which launched this JVM is
INFO | jvm 5 | 2009/08/20 20:22:08 | "3.2.3".
INFO | jvm 5 | 2009/08/20 20:22:08 | The Wrapper may
appear to work correctly but some features may
INFO | jvm 5 | 2009/08/20 20:22:08 | not function
correctly. This configuration has not been tested
INFO | jvm 5 | 2009/08/20 20:22:08 | and is not
supported.
INFO | jvm 5 | 2009/08/20 20:22:08 |
INFO | jvm 5 | 2009/08/20 20:22:08 | Load native library. One or
more attempts may fail if platform specific libraries do not exist.
INFO | jvm 5 | 2009/08/20 20:22:08 | Loading native library
failed: wrapper-windows-x86-32.dll Cause:
java.lang.UnsatisfiedLinkError: no wrapper-windows-x86-32 in
java.library.path
INFO | jvm 5 | 2009/08/20 20:22:08 | Loaded native library:
wrapper.dll
INFO | jvm 5 | 2009/08/20 20:22:08 | Calling native
initialization method.
INFO | jvm 5 | 2009/08/20 20:22:08 | Initializing WrapperManager
native library.
INFO | jvm 5 | 2009/08/20 20:22:08 | Java Executable: C:\WINDOWS
\system32\java.exe
INFO | jvm 5 | 2009/08/20 20:22:08 | Windows version: 5.1.2600
INFO | jvm 5 | 2009/08/20 20:22:08 | WARNING - The Wrapper jar
file currently in use is version "3.2.0"
INFO | jvm 5 | 2009/08/20 20:22:08 | while the version
of the native library is "3.2.3".
INFO | jvm 5 | 2009/08/20 20:22:08 | The Wrapper may
appear to work correctly but some features may
INFO | jvm 5 | 2009/08/20 20:22:08 | not function
correctly. This configuration has not been tested
INFO | jvm 5 | 2009/08/20 20:22:08 | and is not
supported.
INFO | jvm 5 | 2009/08/20 20:22:08 |
INFO | jvm 5 | 2009/08/20 20:22:08 | Java Version : 1.5.0_16-
b02 Java HotSpot(TM) Client VM
INFO | jvm 5 | 2009/08/20 20:22:08 | Java VM Vendor : Sun
Microsystems Inc.
INFO | jvm 5 | 2009/08/20 20:22:08 |
INFO | jvm 5 | 2009/08/20 20:22:08 | WrapperManager.start
(org.mortbay.jetty.win32service.JettyServiceWrapperListener@60aeb0,
args["./etc/jetty-win32-service.xml", "./etc/jetty.xml"]) called by
thread: main
INFO | jvm 5 | 2009/08/20 20:22:08 | Open socket to
wrapper...Wrapper-Connection
INFO | jvm 5 | 2009/08/20 20:22:08 | Opened Socket from 31000 to
32000
INFO | jvm 5 | 2009/08/20 20:22:08 | Send a packet KEY :
5R4r2psj_WlvX_IL
INFO | jvm 5 | 2009/08/20 20:22:08 | handleSocket(Socket[addr=/
127.0.0.1,port=32000,localport=31000])
DEBUG | wrapperp | 2009/08/20 20:22:08 | accepted a socket from
127.0.0.1 on port 31000
DEBUG | wrapperp | 2009/08/20 20:22:08 | read a packet KEY :
5R4r2psj_WlvX_IL
DEBUG | wrapper | 2009/08/20 20:22:08 | Got key from JVM:
5R4r2psj_WlvX_IL
DEBUG | wrapperp | 2009/08/20 20:22:08 | send a packet
LOW_LOG_LEVEL : 1
DEBUG | wrapperp | 2009/08/20 20:22:08 | send a packet PING_TIMEOUT :
30
DEBUG | wrapperp | 2009/08/20 20:22:08 | send a packet PROPERTIES :
(Property Values)
DEBUG | wrapper | 2009/08/20 20:22:08 | Start Application.
DEBUG | wrapperp | 2009/08/20 20:22:08 | send a packet START : start
INFO | jvm 5 | 2009/08/20 20:22:08 | Received a packet
LOW_LOG_LEVEL : 1
INFO | jvm 5 | 2009/08/20 20:22:08 | Wrapper Manager: LowLogLevel
from Wrapper is 1
INFO | jvm 5 | 2009/08/20 20:22:08 | Received a packet
PING_TIMEOUT : 30
INFO | jvm 5 | 2009/08/20 20:22:08 | Wrapper Manager: PingTimeout
from Wrapper is 30000
INFO | jvm 5 | 2009/08/20 20:22:08 | Received a packet
PROPERTIES : (Property Values)
INFO | jvm 5 | 2009/08/20 20:22:08 | Monitoring of the JVM thread
count will be delayed for 1 seconds.
INFO | jvm 5 | 2009/08/20 20:22:08 | Received a packet START :
start
INFO | jvm 5 | 2009/08/20 20:22:08 | calling listener.start()
INFO | jvm 5 | 2009/08/20 20:22:08 | ARG[0] = ./etc/jetty-win32-
service.xml
INFO | jvm 5 | 2009/08/20 20:22:08 | ARG[1] = ./etc/jetty.xml
INFO | jvm 5 | 2009/08/20 20:22:08 | 2009-08-20
20:22:08.431::INFO: Logging to STDERR via org.mortbay.log.StdErrLog
INFO | jvm 5 | 2009/08/20 20:22:08 | 2009-08-20
20:22:08.611::INFO: jetty-6.1.18
INFO | jvm 5 | 2009/08/20 20:22:08 | 2009-08-20
20:22:08.941::INFO: NO JSP Support for , did not find
org.apache.jasper.servlet.JspServlet
INFO | jvm 5 | 2009/08/20 20:22:10 | Aug 20, 2009 8:22:10 PM
com.sun.faces.config.ConfigureListener contextInitialized
DEBUG | wrapper | 2009/08/20 20:22:11 | Pause reading child output
to share cycles.
INFO | jvm 5 | 2009/08/20 20:22:11 | INFO: Initializing Mojarra
(1.2_10-b01-FCS) for context ''
INFO | jvm 5 | 2009/08/20 20:22:11 | Aug 20, 2009 8:22:11 PM
com.sun.faces.spi.InjectionProviderFactory createInstance
INFO | jvm 5 | 2009/08/20 20:22:11 | WARNING: JSF1033: Resource
injection is DISABLED.
INFO | jvm 5 | 2009/08/20 20:22:12 | 2009-08-20
20:22:12.537::INFO: Initializing Spring root WebApplicationContext
INFO | jvm 5 | 2009/08/20 20:22:14 | [EmForge]: [2009-08-20
20:22:14,289] WARN
org.springframework.beans.factory.config.PropertyPlaceholderConfigurer
- Could not load properties from class path resource [config-
user.properties]: class path resource [config-user.properties] cannot
be opened because it does not exist
DEBUG | wrapper | 2009/08/20 20:22:14 | Pause reading child output
to share cycles.
INFO | jvm 5 | 2009/08/20 20:22:16 | [EmForge]: [2009-08-20
20:22:16,623] INFO
org.emforge.upgrademanager.UpgradableSessionFactory - Building new
Hibernate SessionFactory
ERROR | wrapper | 2009/08/20 20:22:39 | Startup failed: Timed out
waiting for signal from JVM.
ERROR | wrapper | 2009/08/20 20:22:39 | JVM did not exit on request,
terminated
DEBUG | wrapperp | 2009/08/20 20:22:40 | server listening on port
32000.
DEBUG | wrapper | 2009/08/20 20:22:40 | JVM was only running for 30
seconds leading to a failed restart count of 5.
FATAL | wrapper | 2009/08/20 20:22:40 | There were 5 failed launches
in a row, each lasting less than 300 seconds. Giving up.
FATAL | wrapper | 2009/08/20 20:22:40 | There may be a
configuration problem: please check the logs.
STATUS | wrapper | 2009/08/20 20:22:40 | <-- Wrapper Stopped

Thanks
Kalyan

On Aug 20, 7:34 pm, Alvaro Pagliari <alvaro...@gmail.com> wrote:
> Hello Kalyan, I don´t have EmForge installed with SQL Server, but I already
> used SQL Server with Hibernate and the microsoft driver is really bad with
> it, many functions are not implemented. Try to use this driver...http://jtds.sourceforge.net/it worked for me...
>
> Configuration
>
> <property
> name="hibernate.connection.driver_class">net.sourceforge.jtds.jdbc.Driver</property>
> <property name="hibernate.connection.password">password</property>
> <property
> name="hibernate.connection.url">jdbc:jtds:sqlserver://server:1433/DATABASE</property>
> <property name="hibernate.connection.username">USER</property>
> <property
> name="hibernate.dialect">org.hibernate.dialect.SQLServerDialect</property>
>
> P.S.: Sorry for my poor english!
>
> --
> Álvaro Gianni Pagliari
> alvaropag [at] gmail [dot] com
> GetGames
>

Alexey Kakunin

unread,
Aug 20, 2009, 11:55:02 AM8/20/09
to emf...@googlegroups.com
Kalyan - I remember there were some issues with protocols in MsSQL server - TCP protocol (used by JDBC) was disabled by default, so, even you is able to connect into server with using MS Server management Studio - it is not accessible from jdbc driver.

So, be sure you enabled TCP protocol.
Also - good check - (but only in case you familiar with it) - try to connect to your DB from some Java-Based DB-management tool (I use Netbeans or Eclipse) with using same jDBC string as well as credentials to login - to see - it login possible or not

Hope my suggestions will help :)

2009/8/20 Kalyan <k.kalya...@gmail.com>



--
With Best Regards,
Alexey Kakunin, EmDev Limited

Professional Software Development:
http://www.emdev.ru

Kalyan

unread,
Aug 20, 2009, 12:05:22 PM8/20/09
to EmForge
Thanks for the suggestions, Alexey.

I run JBOSS server instance locally for my work and with that I am
able to create connection pools and access them through the code. I
double checked TCP/IP configuration in SQL Server. It is enabled and
listening to default port 1433. I am installing MySQL for the purpose
of using EmForge. Hope everything would go fine with MySQL. But still
I am not sure why it is a problem with MSSQL. Is it anything do to
with SQLExpress and SQL 2005. What I have is SQL 2005; not Express
edition.

Thanks
Kalyan


On Aug 20, 8:55 pm, Alexey Kakunin <akaku...@gmail.com> wrote:
> Kalyan - I remember there were some issues with protocols in MsSQL server -
> TCP protocol (used by JDBC) was disabled by default, so, even you is able to
> connect into server with using MS Server management Studio - it is not
> accessible from jdbc driver.
>
> So, be sure you enabled TCP protocol.
> Also - good check - (but only in case you familiar with it) - try to connect
> to your DB from some Java-Based DB-management tool (I use Netbeans or
> Eclipse) with using same jDBC string as well as credentials to login - to
> see - it login possible or not
>
> Hope my suggestions will help :)
>
> 2009/8/20 Kalyan <k.kalyansund...@gmail.com>
> ...
>
> read more »

Alexey Kakunin

unread,
Aug 20, 2009, 12:09:08 PM8/20/09
to emf...@googlegroups.com
OK - I never tested with 2005 (only with Express) - but I hope there should not be an issue between versions - actually - we do not use any server specific features (in fact, EmForge is working with wide range of server starting from hsql and finishing with oracle)

Try to use MySQL - if it will work fine -what will means EmForge itself is ok - and problem only somethere in link between EmForge & MsSQL 2005... In this case we will see what we can do to resolve the issue


2009/8/20 Kalyan <k.kalya...@gmail.com>

Kalyan

unread,
Aug 20, 2009, 12:42:06 PM8/20/09
to EmForge
Ok. Finally I got EmForge working with SQL 2005.

Using SQL Management Studio, I created a new database 'emforge' and a
new SQL login 'emforge'. Then I made login 'emforge' a db_owner of
'emforge' database.

Now I started the service. Everything went on smoothly.

I am able to browse through EmForge portal locally.

Thanks for everyone's assistance.

- Kalyan

On Aug 20, 9:09 pm, Alexey Kakunin <akaku...@gmail.com> wrote:
> OK - I never tested with 2005 (only with Express) - but I hope there should
> not be an issue between versions - actually - we do not use any server
> specific features (in fact, EmForge is working with wide range of server
> starting from hsql and finishing with oracle)
>
> Try to use MySQL - if it will work fine -what will means EmForge itself is
> ok - and problem only somethere in link between EmForge & MsSQL 2005... In
> this case we will see what we can do to resolve the issue
>
> 2009/8/20 Kalyan <k.kalyansund...@gmail.com>
> ...
>
> read more »

Alexey Kakunin

unread,
Aug 20, 2009, 3:29:56 PM8/20/09
to emf...@googlegroups.com
Nice! Happy EmForging! :)

2009/8/20 Kalyan <k.kalya...@gmail.com>
Reply all
Reply to author
Forward
0 new messages