I tried to upgrade to 2.3.1 and encountered the following error
2023-05-24 17:04:14,146 [main] INFO [info.jtrac.config.JtracConfigurer] - jtrac.version = '2.3.1'
2023-05-24 17:04:14,146 [main] INFO [info.jtrac.config.JtracConfigurer] - jtrac.timestamp = '2023-05-23 08:21 UTC'
2023-05-24 17:04:14,146 [main] INFO [info.jtrac.config.JtracConfigurer] - Loading properties file from file [D:\fxdms\apps\jtrac\data\jtrac.properties]
2023-05-24 17:04:14,255 [main] INFO [info.jtrac.config.DataSourceFactoryBean] - embedded HSQLDB mode detected, using Spring single connection data source
2023-05-24 17:04:15,566 [main] INFO [info.jtrac.config.DataSourceFactoryBean] - attempting to shut down embedded HSQLDB database
2023-05-24 17:04:15,878 [main] INFO [info.jtrac.config.DataSourceFactoryBean] - embedded HSQLDB database shut down successfully
2023-05-24 17:04:15,894 [main] ERROR [org.springframework.web.context.ContextLoader] - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jtrac' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'transactionManager' while setting bean property 'transactionManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Unable to instantiate default tuplizer [org.hibernate.tuple.entity.PojoEntityTuplizer]
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:275)
The problem is with the HSQLDB database. Make sure you're using the correct war file for whatever version your HSQLDB data file is, and make sure that your jtrac.properties (particularly url, username and password for HSQLDB) are correct.
I'm using MSSQL, previoulsy used mssql-jdbc-7.2.1.jre8.jar and no issue.
Tried using mssql-jdbc-12.2.0.jre8.jar and mssql-jdbc-12.2.0.jre11.jar and same problem occurred.
I don't have SqlServer available to check. Try and see it if works with mssql-jdbc-7.2.1.jre8.jar, or maybe a version in between like https://mvnrepository.com/artifact/com.microsoft.sqlserver/mssql-jdbc/9.4.1.jre11
I was able to resolve the database issue.
I still got the following error: : Error creating bean with name 'jtrac'
2023-06-01 15:24:01,350 [main] INFO [info.jtrac.config.JtracConfigurer] - found 'jtrac-init.properties' on classpath, processing...
2023-06-01 15:24:01,350 [main] INFO [info.jtrac.config.JtracConfigurer] - locales available configured are 'en,ar,cs,de,el,en,es,es_AR,es_MX,fr,hu,it,ja,ko,nl,no,pl,pt_BR,ru,sl,sv,tr,uk,zh_CN,zh_TW'
2023-06-01 15:24:01,350 [main] INFO [info.jtrac.config.JtracConfigurer] - valid 'jtrac.home' property not available in 'jtrac-init.properties', trying system properties.
2023-06-01 15:24:01,350 [main] INFO [info.jtrac.config.JtracConfigurer] - 'jtrac.home' property initialized from system properties as 'D:\fxdms\apps\jtrac\data'
2023-06-01 15:24:01,350 [main] INFO [info.jtrac.config.JtracConfigurer] - directory already exists: 'D:\fxdms\apps\jtrac\data'
2023-06-01 15:24:01,350 [main] INFO [info.jtrac.config.JtracConfigurer] - directory already exists: 'D:\fxdms\apps\jtrac\data\attachments'
2023-06-01 15:24:01,350 [main] INFO [info.jtrac.config.JtracConfigurer] - directory already exists: 'D:\fxdms\apps\jtrac\data\indexes'
2023-06-01 15:24:01,350 [main] INFO [info.jtrac.config.JtracConfigurer] - 'jtrac.properties' file exists: 'D:\fxdms\apps\jtrac\data\jtrac.properties'
2023-06-01 15:24:01,350 [main] INFO [info.jtrac.config.JtracConfigurer] - found 'jtrac-version.properties' on classpath, processing...
2023-06-01 15:24:01,350 [main] INFO [info.jtrac.config.JtracConfigurer] - jtrac.version = '2.3.1'
2023-06-01 15:24:01,350 [main] INFO [info.jtrac.config.JtracConfigurer] - jtrac.timestamp = '2023-05-23 08:29 UTC'
2023-06-01 15:24:01,350 [main] INFO [info.jtrac.config.JtracConfigurer] - Loading properties file from file [D:\fxdms\apps\jtrac\data\jtrac.properties]
2023-06-01 15:24:01,429 [main] ERROR [org.springframework.web.context.ContextLoader] - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jtrac' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'transactionManager' while setting bean property 'transactionManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: javax/persistence/PersistenceException
I don't know what you mean by "I was able to resolve the database issue." when you're still getting this error.
Something pulls in the javax.persistence package, which jTrac does not ship with. If that's the SqlServer driver, then you need to either use an older version that does not do this, or add that package to jTrac.
I tried with older and newer version, i'm still getting the same error message.
Well, there issomething that pulls in javax.persistence, and it's not JTrac as it ships. If that's the error message you're still getting then you have not removed whatever software pulls that in.
That latest error message is once again about HSQLDB. So it may be trying
to connect to an HSQLDB database created with 1.x. Not knowing what your
setup looks like, check out https://sourceforge.net/p/j-trac/bugs/170/
where I talk about what's involved with migrating to HSQLDB 2.x
On Fri, Jun 16, 2023 at 8:14 AM Ulf Dittmer udittmer@users.sourceforge.net
wrote:
Related
Support Requests: #29
Just an update.
I was using Java 17 and had to add the following to the start.bat
Dsun.misc.URLClassPath.disableJarChecking=true --add-opens jdk.naming.rmi/com.sun.jndi.rmi.registry=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/sun.security.action=ALL-UNNAMED --add-opens java.base/sun.net=ALL-UNNAMED****
I got the following error message when trying to submit ticket.
OS: Windows Server 2019
Java:
openjdk version "17.0.6" 2023-01-17
OpenJDK Runtime Environment Temurin-17.0.6+10 (build 17.0.6+10)
OpenJDK 64-Bit Server VM Temurin-17.0.6+10 (build 17.0.6+10, mixed mode, sharing
2023-08-15 16:30:37,176 [qtp1924582348-17] ERROR [org.apache.wicket.RequestCycle] - Method onFormSubmitted of interface org.apache.wicket.markup.html.form.IFormSubmitListener targeted at component [MarkupContainer [Component id = form]] threw an exception
org.apache.wicket.WicketRuntimeException: Method onFormSubmitted of interface org.apache.wicket.markup.html.form.IFormSubmitListener targeted at component [MarkupContainer [Component id = form]] threw an exception
at org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:194)
at org.apache.wicket.request.target.component.listener.ListenerInterfaceRequestTarget.processEvents(ListenerInterfaceRequestTarget.java:73)
at org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:91)
at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1239)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1316)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1418)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:532)
at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:356)
at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:201)
at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:201)
at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:548)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:600)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1434)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1349)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:191)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:146)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
at org.eclipse.jetty.server.Server.handle(Server.java:516)
at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:400)
at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:645)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:392)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)
at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:409)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883)
at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:183)
... 47 more
Caused by: java.lang.NoClassDefFoundError: javax/activation/DataSource
at org.springframework.mail.javamail.JavaMailSenderImpl.createMimeMessage(JavaMailSenderImpl.java:325)
at info.jtrac.mail.MailSender.send(MailSender.java:205)
at info.jtrac.JtracImpl.storeHistoryForItem(JtracImpl.java:347)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at jdk.proxy4/jdk.proxy4.$Proxy8.storeHistoryForItem(Unknown Source)
at info.jtrac.wicket.ItemViewFormPanel$ItemViewForm.onSubmit(ItemViewFormPanel.java:194)
at org.apache.wicket.markup.html.form.Form.delegateSubmit(Form.java:1384)
at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:811)
... 52 more
Caused by: java.lang.ClassNotFoundException: javax.activation.DataSource
at java.base/java.net.URLClassLoader.findClass(Unknown Source)
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
... 69 more
Did you remove anything? That class is in the jakarta.activation-1.2.1.jar file that comes with JTrac.
jakarta.activation-1.2.1.jar is there under WEB-INF\lib\
Only mssql-jdbc-11.2.0.jre17.jar was added
Then I'm guessing that Java 17 does something different in this regard. I have no time to investigate Java 17 issues at the moment, but I can try to hep if you dig deeper into this.
BTW, I tried the parameters you posted, and also added "--add-opens=java.base/java.util=ALL-UNNAMED --illegal-access=permit", but still got the error that many posts say should not happen once these options are engaged. So the issue seems to go deeper, and certainly deeper than I can investigate at the moment.