You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by Romain Manni-Bucau <rm...@gmail.com> on 2015/04/03 08:40:46 UTC
Re: Intermittently java.lang.NoClassDefFoundError
Hi
Do you deploy a war, an ear? Where is the driver, in tomee/lib?
Le 3 avr. 2015 02:07, "bmattler" <Ro...@gmail.com> a écrit :
> Ok, I'm new to Tomee. I have an app deployed the runs fine and then
> intermittently throws a java.lang.NoClassDefFoundError.
>
> Error:
>
> SEVERE: EjbTransactionUtil.handleSystemException:
> com/microsoft/sqlserver/jdbc/GregorianChange
> java.lang.NoClassDefFoundError:
> com/microsoft/sqlserver/jdbc/GregorianChange
>
> If the app is restarted it works as expected which the same query. Very
> puzzled over this. How does it loose a loaded library. This is happening
> on both my mac and on centos 7.
>
> Using version 1.7.1 with java version of java version "1.7.0_51".
>
>
>
>
>
>
>
>
>
> --
> View this message in context:
> http://tomee-openejb.979440.n4.nabble.com/Intermittently-java-lang-NoClassDefFoundError-tp4674238.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>
Re: Intermittently java.lang.NoClassDefFoundError
Posted by Romain Manni-Bucau <rm...@gmail.com>.
I would be curious to know which thread causes it and the full stack trace
- configuring log pattern you should be able to get it.
In all cases try to not put your drivers in webapps if you can.
Le 6 avr. 2015 15:48, "bmattler" <Ro...@gmail.com> a écrit :
> Thanks for responding.
>
> The application is deployed as a war. It is deployed as root.
>
> The sql driver is in both the tomee/lib and in
> tomee/webapps/ROOT/WEB-INF/lib/. I tried removing the jar from
> tomee/webapps/ROOT/WEB-INF/lib/ and I get the same results. This seems to
> be a redeploy issue. If I reboot the server I don't get this issue. Well
> at least not in the last 5 days.
>
> My tomee.xml is:
>
> <Resource id="sql-server-ds" type="DataSource">
> JdbcDriver = com.microsoft.sqlserver.jdbc.SQLServerDriver
> JdbcUrl = jdbc:sqlserver://10.10.2.120:1433;database=app;
> UserName = user
> Password = pasword
> TestOnBorrow=true
> ValidationQuery= select 1
> MaxActive = 1000
> MinIdle = 10
> RemoveAbandoned = true
> ValidationInterval = 30000
> SuspectTimeout = 60
> TimeBetweenEvictionRunsMillis = 30000
> MinEvictableIdleTimeMillis = 60000
>
> </Resource>
>
>
>
>
>
> --
> View this message in context:
> http://tomee-openejb.979440.n4.nabble.com/Intermittently-java-lang-NoClassDefFoundError-tp4674238p4674294.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>
Re: Intermittently java.lang.NoClassDefFoundError
Posted by bmattler <Ro...@gmail.com>.
Thanks for responding.
The application is deployed as a war. It is deployed as root.
The sql driver is in both the tomee/lib and in
tomee/webapps/ROOT/WEB-INF/lib/. I tried removing the jar from
tomee/webapps/ROOT/WEB-INF/lib/ and I get the same results. This seems to
be a redeploy issue. If I reboot the server I don't get this issue. Well
at least not in the last 5 days.
My tomee.xml is:
<Resource id="sql-server-ds" type="DataSource">
JdbcDriver = com.microsoft.sqlserver.jdbc.SQLServerDriver
JdbcUrl = jdbc:sqlserver://10.10.2.120:1433;database=app;
UserName = user
Password = pasword
TestOnBorrow=true
ValidationQuery= select 1
MaxActive = 1000
MinIdle = 10
RemoveAbandoned = true
ValidationInterval = 30000
SuspectTimeout = 60
TimeBetweenEvictionRunsMillis = 30000
MinEvictableIdleTimeMillis = 60000
</Resource>
--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/Intermittently-java-lang-NoClassDefFoundError-tp4674238p4674294.html
Sent from the TomEE Users mailing list archive at Nabble.com.