Forums

angle-left Back

Problem with deployment - HTTP 400 error

U
Anonymous, modified 11 Years ago.

Problem with deployment - HTTP 400 error

New Member Posts: 15 Join Date: 12/13/06 Recent Posts
I'm a newbie to portal development and I am currently trying to migrate to liferay 4.2. I managed to successfully deploy my application wars in liferay 4.2 with tomcat, but when I try to access http://localhost:8000 (I had changed the non-SSL Connector port in server.xml to 8000 from the default 8080) I get a

HTTP:400 Bad request

error in IE. Can anyone plz suggest what might cause this problem? I've been desperately trying to resolve this.emoticon Any help would be greatly appreciated.
Elisabeth VanSchaardenburg, modified 11 Years ago.

RE: Problem with deployment - HTTP 400 error

Regular Member Posts: 184 Join Date: 5/23/06 Recent Posts
I'd suggest looking at your Tomcat log files and make sure everything started successfully. You should see some stuff like this:


Loading jar:file:/D:/3-Projects/400/tomcat/webapps/ROOT/WEB-INF/lib/portal-ejb.jar!/system.properties
Loading jar:file:/D:/3-Projects/400/tomcat/webapps/ROOT/WEB-INF/lib/portal-ejb.jar!/portal.properties
Loading file:/D:/3-Projects/400/tomcat/webapps/ROOT/WEB-INF/classes/portal-ext.properties
Starting Liferay Portal Professional 4.1.2 (Cowper / Build 3102 / August 31, 2006)
Loading jar:file:/D:/3-Projects/400/tomcat/webapps/ROOT/WEB-INF/lib/portal-ejb.jar!/cache-multi-vm.properties
00:18:15,915 INFO [ServerDetector:76] Detected server tomcat
00:18:16,040 INFO [AutoDeployDir:76] Auto deploy scanner started for \home\liferay\deploy
Loading file:/D:/3-Projects/400/tomcat/webapps/cms-web/WEB-INF/classes/cms-redirects.properties
00:19:28,929 INFO [LuceneFileExtractor:139] No filter found for extension .jpg
00:19:29,398 INFO [LuceneFileExtractor:139] No filter found for extension .jpg
Dec 13, 2006 12:19:31 AM org.apache.catalina.realm.JAASRealm setUseContextClassLoader
INFO: Setting useContextClassLoader = false
00:19:32,179 INFO [[/tunnel-web]:646] Loading Spring root WebApplicationContext
00:19:35,788 INFO [[/tunnel-web]:646] Loading WebApplicationContext for Spring FrameworkServlet 'SpringServlet'
Dec 13, 2006 12:19:35 AM org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8412
Dec 13, 2006 12:19:36 AM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8011
Dec 13, 2006 12:19:36 AM org.apache.jk.server.JkMain start
INFO: Jk running ID=2 time=0/94 config=null
Dec 13, 2006 12:19:36 AM org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
Dec 13, 2006 12:19:36 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 102341 ms
U
Anonymous, modified 11 Years ago.

RE: Problem with deployment - HTTP 400 error

New Member Posts: 15 Join Date: 12/13/06 Recent Posts
Thanks Elisabeth!!

But I still have the same problem.There is a compatibility issue when tomcat deploys the themes, but will that prevent even the login screen from showing up and why should I get a http 400 - bad request error? I get the following logs when I start tomcat:

log4j:WARN No appenders could be found for logger (org.apache.catalina.startup.Embedded).
log4j:WARN Please initialize the log4j system properly.
Loading jar:file:/D:/Liferay-4.2.0/apache-tomcat-5.5.17/common/lib/ext/portal-ejb.jar!/system.properties
Loading jar:file:/D:/Liferay-4.2.0/apache-tomcat-5.5.17/common/lib/ext/portal-ejb.jar!/portal.properties
Loading jar:file:/D:/Liferay-4.2.0/apache-tomcat-5.5.17/common/lib/ext/ext-ejb.jar!/portal-ext.properties
Starting Liferay Portal Professional 4.2.0 (Cowper / Build 3500 / December 11, 2006)
15:29:57,493 INFO  [DynamicDialect:74] Determining dialect for MySQL 4
15:29:57,508 INFO  [DynamicDialect:81] Using dialect org.hibernate.dialect.MySQLDialect
Loading jar:file:/D:/Liferay-4.2.0/apache-tomcat-5.5.17/common/lib/ext/portal-ejb.jar!/cache-multi-vm.properties
15:30:02,368 INFO  [HotDeployUtil:76] Initializing hot deploy manager 18313493
15:30:02,399 INFO  [ServerDetector:76] Detected server tomcat
15:30:03,414 INFO  [AutoDeployDir:76] Auto deploy scanner started for \home\liferay\deploy
15:30:05,227 INFO  [HotDeployThemeListener:75] Registering themes for myprojecttheme

15:30:05,227 ERROR [ThemeLocalUtil:389] Themes in this WAR are not compatible with Liferay Portal Professional / 4.2.0
15:30:05,243 INFO  [HotDeployThemeListener:85] Themes for myprojecttheme registered successfully
15:30:05,461 INFO  [HotDeployPortletListener:129] Registering portlets for myproject
15:30:05,524 INFO  [HotDeployPortletListener:342] Portlets for myproject registered successfully
15:30:05,852 INFO  [PropertiesReader:70] Loading property cache
15:30:05,868 INFO  [PropertiesReader:73] The Jboss URL -->  jnp://localhost:1099

15:30:05,868 INFO  [PropertiesReader:75] Properties cached
oracle.jdbc.driver.OracleConnection@52d654
15:30:11,446 INFO  [HotDeployThemeListener:75] Registering themes for dbtheme
15:30:11,461 ERROR [ThemeLocalUtil:389] Themes in this WAR are not compatible with Liferay Portal Professional / 4.2.0
15:30:11,461 INFO  [HotDeployThemeListener:85] Themes for dbtheme registered successfully
15:30:11,727 INFO  [Http11BaseProtocol:156] Starting Coyote HTTP/1.1 on http-8000
15:30:11,930 INFO  [ChannelSocket:364] Port busy 8009 java.net.BindException: Address already in use: JVM_Bind
15:30:11,930 INFO  [ChannelSocket:374] JK: ajp13 listening on /0.0.0.0:8010
15:30:11,977 INFO  [JkMain:343] Jk running ID=1 time=0/78  config=null
15:30:12,024 INFO  [StoreLoader:229] Find registry server-registry.xml at classpath resource
15:30:12,164 INFO  [Catalina:559] Server startup in 23781 ms


Any clue as to what might be the problem?
Elisabeth VanSchaardenburg, modified 11 Years ago.

RE: Problem with deployment - HTTP 400 error

Regular Member Posts: 184 Join Date: 5/23/06 Recent Posts
Like you, I don't expect that the themes compatibility should be causing problems.

I do see the following in line 7 of your log listing:
715:29:57,493 INFO  [DynamicDialect:74] Determining dialect for MySQL 4
815:29:57,508 INFO  [DynamicDialect:81] Using dialect org.hibernate.dialect.MySQLDialect


And then the following at line 23:
15:30:05,868 INFO  [PropertiesReader:75] Properties cached
oracle.jdbc.driver.OracleConnection@52d654


That may be something expected - I'm not familiar with using the portal with JBoss - just thought I'd point that out since there seem to be references to two different databases.

Do you get anything more in the Tomcat log when you try to access the login page?


Elisabeth
RP
rk p, modified 11 Years ago.

RE: Problem with deployment - HTTP 400 error

New Member Posts: 15 Join Date: 12/13/06 Recent Posts
I am actually trying to migrate from liferay 4.1 to liferay 4.2. I had been using the databases previously and they were working fine.

No log at all when I try to access http://localhost:8000 emoticon

Just the logs that I have posted.
Chad Shryock, modified 11 Years ago.

RE: Problem with deployment - HTTP 400 error

Expert Posts: 285 Join Date: 8/26/06 Recent Posts
You might want to take a look at the 8009 port. Tomcat can't connect to it. Something else is taking that port.

Line 28: 15:30:11,930 INFO [ChannelSocket:364] Port busy 8009 java.net.BindException: Address already in use: JVM_Bind


You can take a look here (http://tomcat.apache.org/connectors-doc/faq.html)to see if you can find how to change the port, or find how to turn off the other port from being used.

Hope this helps a little,
Chad.
Elisabeth VanSchaardenburg, modified 11 Years ago.

RE: Problem with deployment - HTTP 400 error

Regular Member Posts: 184 Join Date: 5/23/06 Recent Posts
I think that part's ok - on the next line it shows that it's listening on 8010. I'm running Tomcat solo (no JBoss) and I actually get the same message if I have a few Tomcat instances running, but my portal is still ok.

But you could still be on to something if the connector is being used. I've only used it in instances where I was configuring Apache or IIS to direct servlet/JSP calls to Tomcat. I don't know if it comes into play when using JBoss and Tomcat.

So I hope Chad's right - because I'm stumped. emoticon
RP
rk p, modified 11 Years ago.

RE: Problem with deployment - HTTP 400 error

New Member Posts: 15 Join Date: 12/13/06 Recent Posts
Thanks Chad for the link and thanks Elisabeth!!

I managed to figure out the problem. I was migrating my app from liferay 3.6.1 to liferay 4.2 and I overlooked the name of the xml file in {catalina_home}/conf/Catalina/localhost. Previously we had liferay.xml and I let it be as it was. The installation guide instructs to create ROOT.xml, so when I renamed liferay.xml to ROOT.xml, it did the trick.

Thanks a lot guys for the help emoticon
RP
rk p, modified 11 Years ago.

RE: Problem with deployment - HTTP 400 error

New Member Posts: 15 Join Date: 12/13/06 Recent Posts
Sorry guys. It was not the liferay versioning that caused the discrepancy. I was parallely migrating from tomcat 5.0.28 to 5.5.17. So that caused the problem emoticon