Diese Seite (Version-1) wurde zuletzt am 28-März-2017 14:37 von Markus geändert.

Du bist nicht autorisiert, diese Seite umzubenennen.

Du bist nicht autorisiert, diese Seite zu löschen.

Versionsgeschichte der Seite

Version Zuletzt geändert Größe Autor Änderungen Kommentar

Links

Eingehende Links Ausgehende Links

Versionsunterschiede

Unterschiede zwischen Version und .

Zeile 1: 264 Zeilen hinzugefügt.
[{ALLOW view All}]
[{ALLOW edit Authenticated}]
!!!JBoss7, 20.07.2011
I [downloaded|http://www.jboss.org/jbossas/downloads/] Version 7.0.0.Final, Lightning, Web Profile Only. You may also try the [nighly builds|http://community.jboss.org/thread/167590]
!!Installation on Win7, 64bit
set JBOSS_HOME and PATH as [described|https://docs.jboss.org/author/display/AS7/Getting+Started+Developing+Applications+Guide]\\
{{{
JBOSS_HOME=<jboss>
PATH=[...];<jboss>/bin
}}}
Start JBoss from a MS-Dos Box! When you double click the run.bat nothing happens.\\
Tip: To analyse the log you need to redirect output stream like this: \\
standalone.bat > test001.txt
Bug: correct standalone.bat:
{{{
"%JAVA%" %JAVA_OPTS% ^
"-Dorg.jboss.boot.log.file=%JBOSS_HOME%\standalone\log\boot.log" ^
"-Dlogging.configuration=file:%JBOSS_HOME%/standalone/configuration/logging.properties" ^
(---) -jar "%JBOSS_HOME%\jboss-modules.jar" ^
(+++) -jar %JBOSS_HOME%\jboss-modules.jar ^
-mp "%JBOSS_HOME%\modules" ^
-logmodule "org.jboss.logmanager" ^
-jaxpmodule "javax.xml.jaxp-provider" ^
org.jboss.as.standalone ^
-Djboss.home.dir="%JBOSS_HOME%" ^
%*
}}}
NO BUG! => You must define JBOSS_HOME WITHOUT ending backslash !!
!Logging in JBoss7 and especially for Hibernate 3.6
I tried to change it to make Hibernate show me all SQL parameter bindings.
Generell Information:\\
[Java Logging API|http://www.crazysquirrel.com/computing/java/logging.jspx] > logging.properties, used in JBoss\\
[Apache Commons Logging (JCL)|http://commons.apache.org/logging/guide.html] > wrapper for other implementations\\
[SLF4J|http://www.slf4j.org/] successor of log4j and used in Hibernate
Documentation:\\
(1) See [JBoss7 Getting Started Guide|https://docs.jboss.org/author/display/AS7/Getting+Started+Guide] > chapter "Configure Logging in JBoss Application Server 7"\\
(2) See [JBoss7 Developer Guide > JBoss Logging|https://docs.jboss.org/author/display/AS7/Developer+Guide#DeveloperGuide-JBossLogging]\\
(3) See [Hibernate (core 3.6) Configuration|http://docs.jboss.org/hibernate/core/3.6/reference/en-US/html/session-configuration.html#configuration-logging]
{{{
<property name="hibernate.show_sql" value="true"/>
}}}
To configure logging you have these destinations:
# $JBOSS_HOME/standalone/configuration/standalone.xml
# $JBOSS_HOME/standalone/configuration/logging.properties
# persistence.xml > Hibernate properties (show_sql)
In (1) it is stated that you should use the standalone.xml file to configure additional logging needs in this way:
{{{
<logger category="org.hibernate.type">
<level name="TRACE"/>
</logger>
}}}
The root-logger defines the base settings for the other loggers to inherit by default.\\
For the log types see $JBOSS_HOME/docs/schema/jboss-logging.xsd.\\
I did not make it work, at startup you get a message like "disable bootstraps mode".\\
Maybe these settings are trashed after start (?).
I make it work just with just changing logging.properties:
{{{
# Additional logger names to configure (root logger is always configured)
# Markus Added:
loggers=org.jboss.as.config,org.hibernate.type
# Dump system environment at boot by default
logger.org.jboss.as.config.level=DEBUG
# Markus Added:
logger.org.hibernate.type.level=TRACE
logger.org.hibernate.type.handlers=org.hibernate.type
# Root logger level
logger.level=${jboss.boot.server.log.level:INFO}
# Root logger handlers
logger.handlers=FILE,CONSOLE
# Markus Added: Console handler configuration
handler.org.hibernate.type=org.jboss.logmanager.handlers.ConsoleHandler
handler.org.hibernate.type.properties=autoFlush
handler.org.hibernate.type.autoFlush=true
handler.org.hibernate.type.formatter=PATTERN
# Console handler configuration
handler.CONSOLE=org.jboss.logmanager.handlers.ConsoleHandler
handler.CONSOLE.properties=autoFlush
handler.CONSOLE.level=${jboss.boot.server.log.console.level:INFO}
handler.CONSOLE.autoFlush=true
handler.CONSOLE.formatter=PATTERN
# File handler configuration
handler.FILE=org.jboss.logmanager.handlers.FileHandler
handler.FILE.level=DEBUG
handler.FILE.properties=autoFlush,fileName
handler.FILE.autoFlush=true
handler.FILE.fileName=${org.jboss.boot.log.file:boot.log}
handler.FILE.formatter=PATTERN
# Formatter pattern configuration
formatter.PATTERN=org.jboss.logmanager.formatters.PatternFormatter
formatter.PATTERN.properties=pattern
formatter.PATTERN.pattern=%d{HH:mm:ss,SSS} %-5p [%c] %s%E%n
}}}
! Hibernate [@GeneratedValue|http://docs.jboss.org/hibernate/core/3.6/reference/en-US/html/mapping.html#mapping-declaration-id]
In JBoss 6 I used
{{{
@Id
@GeneratedValue(strategy=GenerationType.AUTO)
private int tableLogId;
}}}
to get a key ID automatically.\\
With JBoss 7 I get the following error
{{{
17:19:31,609 ERROR [org.hibernate.id.enhanced.TableStructure] (http--127.0.0.1-8080-2) could not read a hi value: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'dp.hibernate_sequence' doesn't exist
}}}
After some research I found out, that it will work with
{{{
@GeneratedValue(strategy=GenerationType.IDENTITY)
}}}
So, obviously in JBoss 6 Hibernate has chosen IDENTITY by default for my MYSQL 5.0.27\\
and in JBoss 7 Hiberante choses SEQUENCE for MySQL.
!!Ubuntu 9.04, 32bit
Memory settings:\\
JBOSS_HOME/bin/standalone.conf
{{{
if [ "x$JAVA_OPTS" = "x" ]; then
JAVA_OPTS="-Xms196m -Xmx640m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000"
JAVA_OPTS="$JAVA_OPTS -Djboss.modules.system.pkgs=org.jboss.byteman"
fi
}}}
# set HOSTNAME
# edit file /etc/hostname
# edit file /etc/hosts
Start:
{{{
./standalone.sh > test001.txt &
}}}
Stop:
{{{
ps -ef
kill <pid of java server>
}}}
Replace standalone.xml, public interface:
{{{
<interface name="public">
<inet-address value="127.0.0.1"/>
</interface>
}}}
with
{{{
<interface name="public">
<any-address />
</interface>
}}}
!Mail Bug still in JBoss 7.0.1
The class loader is somehow not loading all classes, you get this error:
{{{
javax.mail.MessagingException: IOException while sending message;
nested exception is:
javax.activation.UnsupportedDataTypeException: no object DCH for MIME type multipart/mixed;
}}}
To correct it, follow
[AS7-1375|https://issues.jboss.org/browse/AS7-1375?page=com.atlassian.jira.plugin.system.issuetabpanels%3Aall-tabpanel#issue-tabs]
and add <dependencies> tag in \\
JBOSS_HOME/modules/javax/activation/api/main/module.xml:
{{{
<module xmlns="urn:jboss:module:1.0" name="javax.activation.api">
<dependencies>
<module name="javax.api" />
<module name="javax.mail.api" >
<imports><include path="META-INF"/></imports>
</module>
</dependencies>
<resources>
<resource-root path="activation-1.1.1.jar"/>
<!-- Insert resources here -->
</resources>
</module>
}}}
!JSP-Wiki
By default JSPWiki is not working with JBoss 7. You need to make three corrections:\\
1. JSPWiki.war\WEB-INF\jspwiki.tld, delete following tag (this class is not defined in JSPWiki.jar):
{{{
<tag>
<name>RSSUserlandLink</name>
<tagclass>com.ecyrd.jspwiki.tags.RSSCoffeeCupLinkTag</tagclass>
<bodycontent>empty</bodycontent>
<attribute>
<name>title</name>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>
}}}
2. JSPWiki.war\WEB-INF\oscache.tld, remove 3x ".module" (there is no "module" in the oscache.jar)
{{{
<tagclass>com.opensymphony.module.oscache.web.tag.CacheTag</tagclass>
<tagclass>com.opensymphony.module.oscache.web.tag.UseCachedTag</tagclass>
<tagclass>com.opensymphony.module.oscache.web.tag.FlushTag</tagclass>
}}}
3. Copy <JRE>\lib\rt.jar to JSPWiki.war\WEB-INF\lib\ \\
Otherwise you get "java.lang.NoClassDefFoundError: Could not initialize class javax.security.auth.SubjectDomainCombiner".
rt.jar contains SubjectDomainCombiner.
Prerequisites (Installation):\\
As of 03.08.2011 the [latest version|http://www.jspwiki.org/wiki/JSPWikiDownload] is still 2.8.4 though you can find discussions about a [version 3.0|https://issues.apache.org/jira/browse/JSPWIKI] release.
1. [Download JSPWiki 2.8.4|http://www.ecyrd.com/~jalkanen/JSPWiki/2.8.4/JSPWiki-2.8.4-bin.zip]\\
2. Extract (mkdir + cp + unzip/gunzig/tar xvf)\\
3. Copy JSPWiki.war to <JBOSS_HOME>\standalone\deployments\\
4. Unzip JSPWiki.war to a folder "JSPWiki.war" and remove file JSPWiki.war"\\
5. Adjust following properties in JSPWiki.war\WEB-INF\jspwiki.properties:
{{{
jspwiki.baseURL=http://localhost:8080/JSPWiki/
jspwiki.fileSystemProvider.pageDir =D:/lang/WebAppServer/jboss7/jspDataTest/
jspwiki.basicAttachmentProvider.storageDir =D:/lang/WebAppServer/jboss7/jspDataTest/
jspwiki.workDir = D:/lang/WebAppServer/jboss7/jspDataTmp/
jspwiki.security = jaas
log4j.appender.FileLog.File = D:/lang/WebAppServer/jboss7/jspDataTmp/jspwiki_log4j.log
log4j.rootCategory=INFO,FileLog
}}}
I raised a ticket at the developers [JSPWIKI-699|https://issues.apache.org/jira/browse/JSPWIKI-699]. But the [class loading|https://docs.jboss.org/author/display/AS7/Developer+Guide#DeveloperGuide-ClassloadinginJBossAS7] and validation has changed in JBoss 7. Anyway, I guess the first two are really bugs. I guess also that the rt.jar can be registered with JBoss 7 somehow differently.
Add to WEB-INF\Lib folder: \\
log4j-1.2.15.jar
JSPWiki security
[JBoss 7|https://docs.jboss.org/author/display/AS7/Security+subsystem+configuration]
[Config|http://community.jboss.org/message/613183]
[FAQ|http://community.jboss.org/wiki/SecurityFAQ]
!Struts 2
JBoss 7 changes the jsessionid after each response due to a strange [cookie path|http://community.jboss.org/thread/168735]. This happens in Firefox 5, IE 9, but not in Chrome and not in Safari 5. So you cannot store any parameter in the session object anymore. To keep the session ID, which is called "sticky session" you need to add this parameter 2x
to JBOSS_HOME/bin/standalone.sh
{{{
-Dorg.apache.tomcat.util.http.ServerCookie.FWD_SLASH_IS_SEPARATOR=false
}}}
Additionally I added this in the web.xml:
{{{
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>server</param-value>
</context-param>
}}}
Annother option would be [this|http://community.jboss.org/thread/168753?tstart=0]
{{{
-Dorg.apache.catalina.STRICT_SERVLET_COMPLIANCE=false
}}}