小编Ale*_*art的帖子

增加堆大小后无法启动Glassfish

我想增加Glassfish的堆大小.为此,我知道我可以达到4GB:

java -Xmx4000M -version
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03-384-10M3425)
Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02-384, mixed mode)
Run Code Online (Sandbox Code Playgroud)

我尝试在domain.xml文件中将-Xmx设置为2GB:

<jvm-options>-Xmx2000m</jvm-options>
Run Code Online (Sandbox Code Playgroud)

但是我收到以下错误:

asadmin> start-domain
Waiting for ... to start .Error starting domain ...
The server exited prematurely with exit code 1.
Before it died, it produced the following output:

Error occurred during initialization of VM
The size of the object heap + VM data exceeds the maximum representable size
launchctl bsexec failed: Inappropriate ioctl for device
Run Code Online (Sandbox Code Playgroud)

使用-v选项启动命令可以得到: …

jvm glassfish heap-size

6
推荐指数
1
解决办法
1万
查看次数

用于索引PDF文件的语义标记

索引PDF文件的正确方法是什么?我想在其中添加语义信息,并帮助搜索引擎更准确,更准确地呈现文件(特定图像,PDF文件中的文本).我正在考虑使用引擎已经理解的本体,如Schema.org.

pdf indexing semantic-web schema.org

5
推荐指数
1
解决办法
765
查看次数

Marshall对象字段作为属性

这是我到目前为止使用JAXB编组我的POJO:

@XmlRootElement
public class Local {
    private Entity entity;

    public void setEntity(Entity entity) {
        this.entity = entity;
    }

    @XmlElement
    public Entity getEntity() {
        return entity;
    }
}
Run Code Online (Sandbox Code Playgroud)

@XmlRootElement
public class Entity {
    private String name;
    private String comment;

    public void setName(String name){
        this.name = name;
    }

    @XmlAttribute
    public String getName(){
        return this.name;
    }

    public void setComment...

    @XmlAttribute
    public void getComment...
}
Run Code Online (Sandbox Code Playgroud)

有了这个,我得到这样的东西:

<local>
    <entity name="" comment=""></entity>
</local>
Run Code Online (Sandbox Code Playgroud)

但是,我更喜欢将name属性作为local的属性:

<local entityName="" entityComment=""></local>
Run Code Online (Sandbox Code Playgroud)

XmlJavaTypeAdapter是一个好的开始吗?

谢谢,亚历克斯

jaxb

2
推荐指数
1
解决办法
4806
查看次数

标签 统计

glassfish ×1

heap-size ×1

indexing ×1

jaxb ×1

jvm ×1

pdf ×1

schema.org ×1

semantic-web ×1