Installing Alfresco to a different app server, such as OC4J

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-05-2005 09:55 PM
I'm trying to install Alfresco to Oracle OC4J and connect it to an Oracle database. I expanded the war file and modified the repository.properties and hibernate-context.xml to use the Oracle database connect info and dialect respectively. I also had to tell hibernate to use org.hibernate.hql.classic.ClassicQueryTranslatorFactory for the hibernate.query.factory_class, otherwise it was throwing a ClassNotFoundException for hibernate (found this issue on the web somewhere).
Then I repackaged the war and deployed it to OC4J. The deployment went fine other than the CIFS server complaining about the domain, which I then fixed up as specified in the README. Some other interesting errors I got when I start the container, that I'm not sure if they are critical are:
I then pointed my browser to /alfresco and it redirected to /alfresco/faces/jsp/login.jsp which does not exist in the war. However /alfresco/jsp/login.jsp does, so I pointed my browser to that one and received a 500 error and the following stack trace:
Any ideas?
Then I repackaged the war and deployed it to OC4J. The deployment went fine other than the CIFS server complaining about the domain, which I then fixed up as specified in the README. Some other interesting errors I got when I start the container, that I'm not sure if they are critical are:
Oct 5, 2005 5:42:30 PM net.sf.joott.uno.UnoConnection connectINFO: connecting using "socket,host=localhost,port=8100,tcpNoDelay=1"…Oct 5, 2005 5:42:30 PM net.sf.joott.uno.UnoConnection connectSEVERE: connection failed: com.sun.star.connection.NoConnectException: java.net.ConnectException: Connection refused17:42:30,819 ERROR [transform.magick.AbstractImageMagickContentTransformer] ImageMagickContentTransformer not available: Failed to execute command: imconvert "/tmp/Alfresco/ImageMagickContentTransformer_init_source_223.gif" "/tmp/Alfresco/ImageMagickContentTransformer_init_target_224.png"17:42:35,545 ERROR [smb.protocol.netbios] NetBIOSNameServer setup error:java.net.BindException: Permission denied at java.net.PlainDatagramSocketImpl.bind0(Native Method) at java.net.PlainDatagramSocketImpl.bind(PlainDatagramSocketImpl.java:82) at java.net.DatagramSocket.bind(DatagramSocket.java:368) at java.net.DatagramSocket.<init>(DatagramSocket.java:210) at java.net.DatagramSocket.<init>(DatagramSocket.java:261) at java.net.DatagramSocket.<init>(DatagramSocket.java:234) at org.alfresco.filesys.netbios.server.NetBIOSNameServer.openSocket(NetBIOSNameServer.java:1080)…
I then pointed my browser to /alfresco and it redirected to /alfresco/faces/jsp/login.jsp which does not exist in the war. However /alfresco/jsp/login.jsp does, so I pointed my browser to that one and received a 500 error and the following stack trace:
java.lang.NullPointerException at javax.faces.webapp.UIComponentTag.setupResponseWriter(UIComponentTag.java:646) at javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:254) at org.apache.myfaces.taglib.core.ViewTag.doStartTag(ViewTag.java:90) at _jsp._login_2e_jsp._jspService(_login_2e_jsp.java:110) [SRC:/jsp/login.jsp:28] at com.orionserver[Oracle Containers for J2EE 10g (10.1.3.0.0) - Developer Preview].http.OrionHttpJspPage.service(OrionHttpJspPage.java:59) at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:414)…
Any ideas?
Labels:
- Labels:
-
Archive
6 REPLIES 6

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-06-2005 03:35 AM
The error "SEVERE: connection failed: com.sun.star.connection.NoConnectException: java.net.ConnectException: Connection refused" is because you don't have OpenOffice installed and running, this is not critical.
The other error "ImageMagickContentTransformer not available: Failed to execute command: imconvert" is because you do not have the imconvert.exe on your system path. You can find this file in the bin directory of your bundle. Again, this isn't critical, unless you want to transform images!
You won't find "/alfresco/faces/jsp/login.jsp" in the WAR file as the /faces/ part of the URL is a servlet mapping, this basically makes all requests go through the JSF servlet. Calling "/alfresco/jsp/login.jsp" directly, as you have found out, will not work as none of the JSF processing will take place.
What error did you get when you pointed the browser at /alfresco (after the redirect). If this file is not found it often means the WAR file did not deploy correctly, which in turn is usually caused by a database error. Do you see anything on the appserver console or log file? Have some tables been created in the database?
The other error "ImageMagickContentTransformer not available: Failed to execute command: imconvert" is because you do not have the imconvert.exe on your system path. You can find this file in the bin directory of your bundle. Again, this isn't critical, unless you want to transform images!
You won't find "/alfresco/faces/jsp/login.jsp" in the WAR file as the /faces/ part of the URL is a servlet mapping, this basically makes all requests go through the JSF servlet. Calling "/alfresco/jsp/login.jsp" directly, as you have found out, will not work as none of the JSF processing will take place.
What error did you get when you pointed the browser at /alfresco (after the redirect). If this file is not found it often means the WAR file did not deploy correctly, which in turn is usually caused by a database error. Do you see anything on the appserver console or log file? Have some tables been created in the database?

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-06-2005 04:11 PM
Hi gavinc,
Thanks for the quick reply.
I saw a slew of errors initially, first having to do with not finding MySQL JDBC libraries, and with a "ClassNotFoundException: org.hibernate.hql.ast.HqlToken". But then I expanded the war, edited the repository and hibernate config files to use Oracle, and changed the query parser to "org.hibernate.hql.classic.ClassicQueryTranslatorFactory" (found the tip here: http://technology.amis.nl/blog/index.php?p=705 ). I also had to add the Oracle JDBC drivers (ojdbc14.jar) to the WEB-INF/lib for them to be picked up. After these fixes I redeployed the war file and it went through okay outside of the errors I referenced above.
I went ahead and used a clean version of oc4j and dropped the alfresco schema, then went through the process again to get a "clean" deployment. The following was logged to the app server console, and to alfresco.log:
Oh, BTW, not sure if it makes a difference but I'm trying to do this on Red Hat AS 3.
Any suggestions?
Thanks for the quick reply.
I saw a slew of errors initially, first having to do with not finding MySQL JDBC libraries, and with a "ClassNotFoundException: org.hibernate.hql.ast.HqlToken". But then I expanded the war, edited the repository and hibernate config files to use Oracle, and changed the query parser to "org.hibernate.hql.classic.ClassicQueryTranslatorFactory" (found the tip here: http://technology.amis.nl/blog/index.php?p=705 ). I also had to add the Oracle JDBC drivers (ojdbc14.jar) to the WEB-INF/lib for them to be picked up. After these fixes I redeployed the war file and it went through okay outside of the errors I referenced above.
I went ahead and used a clean version of oc4j and dropped the alfresco schema, then went through the process again to get a "clean" deployment. The following was logged to the app server console, and to alfresco.log:
12:53:48,270 ERROR [org.alfresco.repo.content.transform.magick.AbstractImageMagickContentTransformer] ImageMagickContentTransformer not available: Failed to execute command: imconvert "/tmp/Alfresco/ImageMagickContentTransformer_init_source_1946.gif" "/tmp/Alfresco/ImageMagickContentTransformer_init_target_1947.png"12:53:53,178 ERROR [org.alfresco.ftp.protocol] FTP Socket errorjava.net.BindException: Permission denied at java.net.PlainSocketImpl.socketBind(Native Method) at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359) at java.net.ServerSocket.bind(ServerSocket.java:319) at java.net.ServerSocket.<init>(ServerSocket.java:185) at java.net.ServerSocket.<init>(ServerSocket.java:141) at org.alfresco.filesys.ftp.FTPNetworkServer.run(FTPNetworkServer.java:377) at java.lang.Thread.run(Thread.java:595)12:53:53,185 ERROR [org.alfresco.smb.protocol.netbios] NetBIOSNameServer setup error:java.net.BindException: Permission denied at java.net.PlainDatagramSocketImpl.bind0(Native Method) at java.net.PlainDatagramSocketImpl.bind(PlainDatagramSocketImpl.java:82) at java.net.DatagramSocket.bind(DatagramSocket.java:368) at java.net.DatagramSocket.<init>(DatagramSocket.java:210) at java.net.DatagramSocket.<init>(DatagramSocket.java:261) at java.net.DatagramSocket.<init>(DatagramSocket.java:234) at org.alfresco.filesys.netbios.server.NetBIOSNameServer.openSocket(NetBIOSNameServer.java:1080) at org.alfresco.filesys.netbios.server.NetBIOSNameServer.run(NetBIOSNameServer.java:1489) at java.lang.Thread.run(Thread.java:595)12:53:53,189 ERROR [org.alfresco.smb.protocol] [SMB] Server error :java.net.BindException: Permission denied at java.net.PlainSocketImpl.socketBind(Native Method) at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359) at java.net.ServerSocket.bind(ServerSocket.java:319) at java.net.ServerSocket.<init>(ServerSocket.java:185) at java.net.ServerSocket.<init>(ServerSocket.java:141) at org.alfresco.filesys.smb.server.SessionSocketHandler.initialize(SessionSocketHandler.java:249) at org.alfresco.filesys.smb.server.NetBIOSSessionSocketHandler.createSessionHandlers(NetBIOSSessionSocketHandler.java:157) at org.alfresco.filesys.smb.server.SMBServer.run(SMBServer.java:522) at java.lang.Thread.run(Thread.java:595)
Some other interesting warnings that were logged to the app server console were like (which there are several of):WARNING: Code-source /u02/app/oracle/product/oc4j_extended/j2ee/home/applications/alfresco/alfresco/WEB-INF/lib/commons-el.jar (from WEB-INF/lib/ directory in /u02/app/oracle/product/oc4j_extended/j2ee/home/applications/alfresco/alfresco/WEB-INF/lib) has the same filename as /u02/app/oracle/product/oc4j_extended/j2ee/home/lib/commons-el.jar (from <code-source> (ignore manifest Class-Path) in META-INF/boot.xml in /u02/app/oracle/product/oc4j_extended/j2ee/home/oc4j.jar) but has a different size.
However it did create some tables in the schema:SQL> connect alfresco/alfrescoConnected.SQL> select table_name from user_tables;TABLE_NAME——————————VERSION_COUNTSTORENODE_PROPERTIESNODE_ASSOCNODE_ASPECTSNODECHILD_ASSOC7 rows selected.
When I go to /alfresco after the deployment I am redirected to /alfresco/faces/jsp/login.jsp and I get:404 Not FoundOracleJSP: java.io.FileNotFoundException:Set the init-param debug_mode to "true" to see the complete exception message.
The app server error console shows:2005-10-06 12:54:19.171 NOTIFICATION J2EE JSP0008 Unable to dispatch JSP Page : Exception:java.io.FileNotFoundException: /u02/app/oracle/product/oc4j_extended/j2ee/home/applications/alfresco/alfresco/faces/jsp/login.jsp (No such file or directory)
So it seems the "/faces/*" mapping in web.xml may not be happening, or at least not happening correctly. I quickly built a small test app that had a single /jsp/index.jsp and configured the Faces Servlet in web.xml, e.g. <servlet> <servlet-name>Faces Servlet</servlet-name> <servlet-class>javax.faces.webapp.FacesServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>Faces Servlet</servlet-name> <url-pattern>/faces/*</url-pattern> </servlet-mapping>
And when I went to /myTestApp/faces/jsp/index.jsp it worked. I'm a bit new to JSF so I'm afraid I don't have enough expertise to debug it further. I think the test app I built was using the Sun Java JSF (jsf-*.jar).Oh, BTW, not sure if it makes a difference but I'm trying to do this on Red Hat AS 3.
Any suggestions?

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2005 09:47 AM
The errors you are seeing regarding JVM_Bind are probably because you are running on Linux as a non root user. The FTP and CIFS server tries to connect to their respective default ports which require root access.
The next warning is probably caused by conflicting versions of the mentioned libraries between the ones in our WAR file and the ones in Oracle. I'm guessing the ones in our WAR take precedence.
You're right, Oracle seems to be interpreting the /faces mapping as an actual file path as opposed to a virtual mapping. To be honest I'm not very familiar with Oracle's app server so I don't have a clue why it would be doing that!
You could try turning on debugging for MyFaces (the JSF implementation we use), you'll have to edit log4j.properties in /alfresco/WEB-INF/classes and add the following line:
log4j.logger.org.apache.myfaces=debug
Changing the line "log4j.logger.org.alfresco.web=info" to "log4j.logger.org.alfresco.web=debug" may also help give some more information.
The next warning is probably caused by conflicting versions of the mentioned libraries between the ones in our WAR file and the ones in Oracle. I'm guessing the ones in our WAR take precedence.
You're right, Oracle seems to be interpreting the /faces mapping as an actual file path as opposed to a virtual mapping. To be honest I'm not very familiar with Oracle's app server so I don't have a clue why it would be doing that!
You could try turning on debugging for MyFaces (the JSF implementation we use), you'll have to edit log4j.properties in /alfresco/WEB-INF/classes and add the following line:
log4j.logger.org.apache.myfaces=debug
Changing the line "log4j.logger.org.alfresco.web=info" to "log4j.logger.org.alfresco.web=debug" may also help give some more information.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2005 09:01 PM
Hey Gavin,
Thanks for the details. I continued to play around w/ the WAR that I got from the Tomcat distribution, including enabling the logging as you suggested and I wasn't getting anywhere - same error.
So, I decided to download the source distribution so it would be easier to make changes and rebuild it. Turns out that building the tomcat target from the source distribution and then deploying that seemed to fix the issue. Or at least that appeared to - I did also update to a slightly newer build of OC4J 10.1.3 that might have had an affect.
Thanks for your help - I have it up and running now in OC4J 10.1.3 connected to Oracle 10G DB.
Thanks for the details. I continued to play around w/ the WAR that I got from the Tomcat distribution, including enabling the logging as you suggested and I wasn't getting anywhere - same error.
So, I decided to download the source distribution so it would be easier to make changes and rebuild it. Turns out that building the tomcat target from the source distribution and then deploying that seemed to fix the issue. Or at least that appeared to - I did also update to a slightly newer build of OC4J 10.1.3 that might have had an affect.
Thanks for your help - I have it up and running now in OC4J 10.1.3 connected to Oracle 10G DB.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2007 02:43 PM
The other error "ImageMagickContentTransformer not available: Failed to execute command: imconvert" is because you do not have the imconvert.exe on your system path. You can find this file in the bin directory of your bundle. Again, this isn't critical, unless you want to transform images!
I have enterprise 2.0.1 installed on Solaris 10. I dont see the bin directory in the bundle, but the Windows version has it and therefore I get the error:
ERROR [org.alfresco.repo.content.transform.magick.AbstractImageMagickContentTransformer] ImageMagickContentTransformer not available: Failed
to execute command: convert /var/tmp/Alfresco/ImageMagickContentTransformer_init_source_44234.gif /var/tmp/Alfresco/ImageMagickContentTransformer_init_ta
rget_44235.png
The equivalent of imconvert.exe in Unix seems to be convert, but I dont see it anywhere. Help please…

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2007 03:21 PM
the package name is ImageMagick
