This page last changed on Feb 09, 2013 by juha.

After being unable to move past an error getting the Designer to run locally (See another thread) I've had to upgrade my machine and I'm now on open-jdk 1.7 I've gone back to building the Designer from scratch and I'm now getting errors. I was building ok under jdk 1.6

Is anybody aware of any issues with building under this version of java?

    [javac] 1. ERROR in /home/john/programming/openremote/johnwhitmore/Designer_2_13_6_Rosemary_20120920/src/org/openremote/modeler/beehive/Beehive30API.java (at line 128)
    [javac] 	@Override public void downloadResources
    [javac] (User currentUser, ResourceCache cache)
    [javac]       throws ConfigurationException, NetworkException, CacheOperationException
    [javac] 	                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    [javac] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    [javac] The method downloadResources(User, ResourceCache) of type Beehive30API must override a superclass method
    [javac] ----------

Found the problem I'd installed the "jdk" package but there is a "jdk-devel" as well!

Not I've the Designer down to one compile error a "name clash":

    [javac] /home/john/programming/openremote/johnwhitmore/Designer_2_13_6_Rosemary_20120920/src/org/openremote/modeler/domain/component/UIComponent.java:177: error: name clash: createModels(Collection<? extends UIComponent>) in UIComponent and createModels(Collection<? extends BusinessEntity>) in BusinessEntity have the same erasure, yet neither hides the other
    [javac]    public static List<BeanModel> createModels(Collection<? extends UIComponent> list) {
    [javac]                                  ^ 
Posted by johnwhitmore at Jan 14, 2013 00:02

Still have not heard any useful response to this problem and not sure where the best place to get help on OpenRemote is. Is there another forum or email list which is more widely used by the community?

I started this in order to add a protocol to the OpenRemote which everybody says is as simple as adding an XML file. It may well be that simple but getting to that point were you have a working OpenRemote Designer to add a new XML file to is not so simple given that the project as it checks out of Subversion don't even build under Java 1.7. The above question has been sitting for a few days now so could somebody suggest a more productive channel?

Posted by johnwhitmore at Jan 28, 2013 17:49

Why not use JDK1.6 if it built fine there?

Posted by mredeker at Jan 29, 2013 08:12

ARAGH!

Got it building and now Beehive, which was giving me a web page on :8080/beehive, is giving me errors when I try and use the modeler. I have to set up subversion server on this machine to get it running. This is more of a Sys Admin job then creating an xml file!

Has anybody ever gotten through all the necessary steps to get the Designer running locally, in order to create an xml file?

Do I seriously have to set up and configure subversion server?

Posted by johnwhitmore at Jan 29, 2013 23:17

You don't need subverison. The error can be ignored.

Posted by mredeker at Jan 30, 2013 08:06

Excellent! Thanks a million Marcus I had a few warnings out of Beehive but that was the only error.

I'm getting a blank browser at localhost:8080/modeler so I'm assuming something is incorrect. The only thing I can see is that the error I'm getting:

Beehive 3.0 Beta1 | 2013-01-30 15:22:26,251 ERROR
[org.openremote.beehive.api.service.impl.SVNDelegateServiceImpl] : Unable to create local repository 'file:///home/john/programming/openremote/johnwhitmore/svn-repos/lirc/trunk', please install svn server to sync with LIRC.

makes reference to a directory that doesn't exist. I think it's coming from my config of Beehive. In the config.properties file of Beehive there is a work.dir setting which I'm not sure about:

#Work directory, contains svn-repos, workCopy and sync history logs.
#work.dir = /opt/tomcat6/beehive.openremote.org/3.0/alpha5
work.dir = /home/john/programming/openremote/johnwhitmore

The error above is looking for a directory "svn-repos" under that work.dir

Can I ask what that setting in the Beehive configuration should be set to. It's funny in spite of the blank screen I'm getting no errors from the Designer

Posted by johnwhitmore at Jan 30, 2013 15:40

The work.dir has to point to a valid directory. The svn-repos folder does not matter.
For the designer to work, you need the modeler.war and the beehive.war deployed on a tomcat.
Also a mysql DB has to be running and beehive and modeler have to be configuered to connect to it.
You should be able to connect to localhost:8080/beehive and see something and also localhost:8080/modeler should show the modeler.

Posted by mredeker at Jan 30, 2013 20:16

JAVA Just Another vulnerability alert

Thanks for your patience and assistance Marcus. I might have made progress, but I doubt it. I could not get anything out of the modeler so I moved back to the protocol which I sort of hijacked from X10 into the controller. It's not perfect but it allowed me to play.

Anyhow had the controller working but decided I'd add a few lines of debug logging to one of my files. Adding those debug lines and installing in tomcat caused my localhost:8080/controller to show me a blank page, exactly like the Modeler. As with the modeler there is NO logging from the webapp.

So I had a notion and checked the tomcat log and localhost:8080/controller is giving a 404 error? Checked the modeler URI and it's giving the same 404 error.

Needless to say I removed my lines of debug logging and reinstalled. Controller -> works fine now!

All that is going to mean you can't offer any help. Adding debug changes the results of the code. As for the Designer I've checked out the code from subversion and changed nothing but it could be something equally as minute that is causing a 404 Error. The tomcat logs show that both webapps have been deployed and there's no mention of error.

Man I hate JAVA

Posted by johnwhitmore at Jan 30, 2013 21:23

Sorry to hear that
Java and Java web technologies are certainly nothing which can be done in 5 minutes.
Let me know if I can be of any more assistance.
Also, I can ask Juha to deploy your protocol.xml to be deployed on the preview instance of the designer

Posted by mredeker at Jan 30, 2013 21:29

Just plain annoying that the tomcat logs show that both apps deploy without any mention of an error and then when you try and point the browser at them it's a blank screen and the log shows a 404 error.

Must be something to do with the system config but we're back to Sys Admin work here. If it'd just pop some sort of helpful logging that would be the business but tomcat ain't playing nice.

I'll let you know if I manage to progress, but don't hold your breadth.

Posted by johnwhitmore at Jan 30, 2013 21:33

Marcus I got it

OK it's a bit embarrassing that I didn't get it sooner, but I'm a newbie! I was thinking of the 404 error on the modeler web page so installed the tomcat management package in OpenSuse just to see would that help me understand the issue. Hey Presto that management web page gives me the currently installed web apps and their domain. What do you know the modeler web app is installed and running and it's web address is:

http://127.0.0.1:8080/Designer-2.13.6-2012-09-20-Rosemary

That's probably defined in config.properties but I never thought to look there assuming that the address was /modeler Anyhow job done I'll hopefully be opening more productive threads in future

Thanks again for all your help

Posted by johnwhitmore at Jan 31, 2013 18:13

Oh God I spoke too soon the login page is causing a huge stack trace of errors

Posted by johnwhitmore at Jan 31, 2013 18:16

Look into the tomcat/webapps folder. Is the file called "Designer-2.13.6-2012-09-20-Rosemary.war"? Just rename that to "modeler.war".
What stacktraces do you see?

Posted by mredeker at Jan 31, 2013 19:09

The stack trace is pointing to a generated file in the output directory, register.jsp, and it's moaning about the syntax of the jsp. I'm not too familiar with the JSP Specification and since the file is generated by the build I'm not sure the actual source of the problem at the moment.

Feb 01, 2013 6:10:25 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet [jsp] in context with path [/Designer-2.13.6-2012-09-20-Rosemary] threw exception [/register.jsp (line: 135, column: 97) The JSP specification requires that an attribute name is preceded by whitespace] with root cause
org.apache.jasper.JasperException: /register.jsp (line: 135, column: 97) The JSP specification requires that an attribute name is preceded by whitespace
	at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:42)
	at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:408)
	at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:89)
	at org.apache.jasper.compiler.Parser.parseAttributes(Parser.java:164)
	at org.apache.jasper.compiler.Parser.parseAttributes(Parser.java:153)
	at org.apache.jasper.compiler.Parser.parseCustomTag(Parser.java:1236)
	at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1452)
	at org.apache.jasper.compiler.Parser.parse(Parser.java:138)
	at org.apache.jasper.compiler.ParserController.doParse(ParserController.java:242)
	at org.apache.jasper.compiler.ParserController.parse(ParserController.java:102)
	at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:198)
	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:373)
	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:353)
	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:340)
	at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:646)
	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:378)
	at org.springframework.security.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
	at org.springframework.security.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
	at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
	at org.springframework.security.ui.SessionFixationProtectionFilter.doFilterHttp(SessionFixationProtectionFilter.java:67)
	at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
	at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
	at org.springframework.security.ui.ExceptionTranslationFilter.doFilterHttp(ExceptionTranslationFilter.java:101)
	at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
	at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
	at org.springframework.security.ui.rememberme.RememberMeProcessingFilter.doFilterHttp(RememberMeProcessingFilter.java:109)
	at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
	at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
	at org.springframework.security.wrapper.SecurityContextHolderAwareRequestFilter.doFilterHttp(SecurityContextHolderAwareRequestFilter.java:91)
	at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
	at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
	at org.springframework.security.ui.AbstractProcessingFilter.doFilterHttp(AbstractProcessingFilter.java:277)
	at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
	at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
	at org.springframework.security.ui.logout.LogoutFilter.doFilterHttp(LogoutFilter.java:89)
	at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
	at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
	at org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:235)
	at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
	at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
	at org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:175)
	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:183)
	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:138)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:999)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:565)
	at org.apache.tomcat.util.net.AprEndpoint$SocketWithOptionsProcessor.run(AprEndpoint.java:1770)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
	at java.lang.Thread.run(Thread.java:722)

Posted by johnwhitmore at Feb 01, 2013 18:33

I think your tomcat installation might be too old.
We are using Tomcat 6 as minimum.

Posted by mredeker at Feb 01, 2013 20:08

I'm using tomcat 7.0.27 so unless this version is too up to date?

Posted by johnwhitmore at Feb 01, 2013 20:28

Weird, when I googled the error it was related to a Tomcat5.
Something with JSTL tag library.
The line in register.jsp is not needed. Just delete it and see what happens.

Posted by mredeker at Feb 01, 2013 21:14

Thanks and yes removing that ling clears that error and allows me to fill in the fields to create a new account on my local machine. Unfortunately it's now giving me an error on my entered email address.

2013-02-01 22:40:46,129 ERROR [Activate] : 

-----------------------------------------------------------

FAILED to send registration email to johnfwhitmore@gmail.com(User : 4, whitmore) : Could not parse mail; nested exception is javax.mail.internet.AddressException: Illegal address in string ``''

-----------------------------------------------------------


org.springframework.mail.MailParseException: Could not parse mail; nested exception is javax.mail.internet.AddressException: Illegal address in string ``''
Caused by: 
javax.mail.internet.AddressException: Illegal address in string ``''
	at javax.mail.internet.InternetAddress.<init>(InternetAddress.java:110)
	at org.springframework.mail.javamail.MimeMessageHelper.setFrom(MimeMessageHelper.java:544)
	at org.openremote.modeler.service.impl.UserServiceImpl$1.prepare(UserServiceImpl.java:204)
	at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:344)
	at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:336)
	at org.openremote.modeler.service.impl.UserServiceImpl.sendRegisterActivationEmail(UserServiceImpl.java:239)
	at org.openremote.modeler.service.impl.UserServiceImpl.createUserAccount(UserServiceImpl.java:143)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
	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 $Proxy32.createUserAccount(Unknown Source)
	at org.openremote.modeler.action.AccountController.create(AccountController.java:112)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.springframework.web.servlet.mvc.multiaction.MultiActionController.invokeNamedMethod(MultiActionController.java:445)
	at org.springframework.web.servlet.mvc.multiaction.MultiActionController.handleRequestInternal(MultiActionController.java:382)
	at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
	at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:859)
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:793)
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:476)
	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:441)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:378)
	at org.springframework.security.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
	at org.springframework.security.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
	at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
	at org.springframework.security.ui.SessionFixationProtectionFilter.doFilterHttp(SessionFixationProtectionFilter.java:67)
	at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
	at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
	at org.springframework.security.ui.ExceptionTranslationFilter.doFilterHttp(ExceptionTranslationFilter.java:101)
	at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
	at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
	at org.springframework.security.ui.rememberme.RememberMeProcessingFilter.doFilterHttp(RememberMeProcessingFilter.java:109)
	at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
	at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
	at org.springframework.security.wrapper.SecurityContextHolderAwareRequestFilter.doFilterHttp(SecurityContextHolderAwareRequestFilter.java:91)
	at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
	at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
	at org.springframework.security.ui.AbstractProcessingFilter.doFilterHttp(AbstractProcessingFilter.java:277)
	at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
	at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
	at org.springframework.security.ui.logout.LogoutFilter.doFilterHttp(LogoutFilter.java:89)
	at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
	at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
	at org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:235)
	at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
	at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
	at org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:175)
	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:183)
	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:138)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:999)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:565)
	at org.apache.tomcat.util.net.AprEndpoint$SocketWithOptionsProcessor.run(AprEndpoint.java:1770)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
	at java.lang.Thread.run(Thread.java:722)

Posted by johnwhitmore at Feb 01, 2013 22:46

how does your config.properties file look like, especially the mail configuration part?

Posted by juha at Feb 02, 2013 04:05

Thanks a million Juha,
because this is coming from the register a new account login I thought it was a problem with the email address I was specifying. Never thought of the configuration file at all. You got me on the right track there but I'm struggling to get the designer to talk to an smtp server. I've tried to configure both gmail (smtp.googlemail.com) and yahoo (smtp.mail.yahoo.com) but the modeler just ain't happy, and ain't getting a response it's happy with.

Maybe I should set up postfix on this machine and point it at that.

Posted by johnwhitmore at Feb 03, 2013 01:44

Does the logfiles our console output give you any hint why the SMTP connection is failing?

Posted by mredeker at Feb 04, 2013 09:08

Unfortunately not, I'm afraid. I'm just getting a timeout trying to send an email. My settings in config.properties are:

mail.sender.host=smtp.googlemail.com
mail.sender.port=465
mail.sender.username=my_gmail_user
mail.sender.password=my_gmail_password
mail.smtp.auth.on=true
mail.smtp.timeout=25000

The only thing I can think is that the setting for mail.smtp.auth.on needs another setting which defines what type of authentication should be used. These settings are as in my email client on the machine so I'm struggling to find a reason for the problem. I'll give you the log output but I'm not finding it much use. Timeout suggests there's a config issue with the server but like I say email client works.

2013-02-04 18:19:43,004 INFO : Sent account registration email to rupert_swivelchair@yahoo.com.au(User : 10, toby).
2013-02-04 18:29:44,539 ERROR :

-----------------------------------------------------------

FAILED to send registration email to rupert_swivelchair@yahoo.com.au(User : 10, toby) : Mail server connection failed; nested exception is javax.mail.MessagingException: Could not connect to SMTP host: smtp.googlemail.com, port: 465, response: -1

-----------------------------------------------------------

org.springframework.mail.MailSendException: Mail server connection failed; nested exception is javax.mail.MessagingException: Could not connect to SMTP host: smtp.googlemail.com, port: 465, response: -1
Caused by:
javax.mail.MessagingException: Could not connect to SMTP host: smtp.googlemail.com, port: 465, response: -1
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1694)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:525)
at javax.mail.Service.connect(Service.java:291)
at org.springframework.mail.javamail.JavaMailSenderImpl.doSend(JavaMailSenderImpl.java:379)
at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:332)
at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:347)
at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:336)
at org.openremote.modeler.service.impl.UserServiceImpl.sendRegisterActivationEmail(UserServiceImpl.java:244)
at org.openremote.modeler.service.impl.UserServiceImpl.createUserAccount(UserServiceImpl.java:143)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
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 $Proxy32.createUserAccount(Unknown Source)
at org.openremote.modeler.action.AccountController.create(AccountController.java:112)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.springframework.web.servlet.mvc.multiaction.MultiActionController.invokeNamedMethod(MultiActionController.java:445)
at org.springframework.web.servlet.mvc.multiaction.MultiActionController.handleRequestInternal(MultiActionController.java:382)
at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:859)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:793)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:476)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:441)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:378)
at org.springframework.security.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
at org.springframework.security.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
at org.springframework.security.ui.SessionFixationProtectionFilter.doFilterHttp(SessionFixationProtectionFilter.java:67)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
at org.springframework.security.ui.ExceptionTranslationFilter.doFilterHttp(ExceptionTranslationFilter.java:101)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
at org.springframework.security.ui.rememberme.RememberMeProcessingFilter.doFilterHttp(RememberMeProcessingFilter.java:109)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
at org.springframework.security.wrapper.SecurityContextHolderAwareRequestFilter.doFilterHttp(SecurityContextHolderAwareRequestFilter.java:91)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
at org.springframework.security.ui.AbstractProcessingFilter.doFilterHttp(AbstractProcessingFilter.java:277)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
at org.springframework.security.ui.logout.LogoutFilter.doFilterHttp(LogoutFilter.java:89)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
at org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:235)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
at org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:175)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:183)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:138)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:999)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:565)
at org.apache.tomcat.util.net.AprEndpoint$SocketWithOptionsProcessor.run(AprEndpoint.java:1770)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)

Posted by johnwhitmore at Feb 04, 2013 18:42

Might be a TLS/SSL issue which I don't think we tested yet.
You can just set your username valid flag to true directly in the database.
Then you don't need the email stuff

Posted by mredeker at Feb 04, 2013 20:33

Inspired solution to the problem. Did that and we're in at last.

Thanks a million for all your help Marcus been a struggle but we got there

Posted by johnwhitmore at Feb 06, 2013 00:58

In tomcat7, org.apache.jasper.compiler.Parser.STRICT_WHITESPACE is set by default to true. So we need to insert

org.apache.jasper.compiler.Parser.STRICT_WHITESPACE=false

in the catalina.properties file, or we could add spaces between attributes as in the row reported.

Posted by marco.miccini at Nov 12, 2013 09:44
Document generated by Confluence on Jun 05, 2016 09:29