我使用"创建新项目向导"创建了一个新项目,选择"从头开始创建项目",但它完全是空的(根本没有java类,所以我在空项目中手动创建了一个新的swing表单).
在我使用的许多其他IDE中,有一种方法可以单击一次,并获得一个新的"新Gui项目",我通常期望它在"文件 - >新项目"向导中或类似的东西.
IntelliJ IDEA IDE中有一个新的项目向导,但它似乎只能创建一个空白项目,然后我可以手动添加一个表单.所以我做到了.但是,它缺少您期望它拥有的任何常用Java代码,打开该表单并将其显示为应用程序.
我试图了解IntelliJ IDEA的特性和功能,它看起来很强大,作为一个非常快速和高效的编辑器和调试器和构建系统GUI包装围绕ANT构建系统,但我想知道是否有更多的"RAD"功能,我只是忽略了.我已经做了一些谷歌搜索和阅读文档,但我没有发现使用IntelliJ IDEA在Java中构建GUI应用程序.
我目前卡住的地方是当我尝试使用空表单构建并运行我的空项目时,我进入某种"运行"目标配置屏幕,我尝试单击[+]图标,然后添加"MyForm01"是我创建的空转形式,它在对话框中说"MyForm01是不可接受的".我知道足够的java知道IDE不会自动生成基本的"GUI应用程序框架代码".我可以去互联网上复制和粘贴一些东西,但我感兴趣的是知道该工具是否可以自动用于构建GUI,工作流程与其他RAD式GUI构建工具一样简单,包括NetBeans,我最熟悉的java工具,或Delphi,这是我的主要日常工具,它是基于Pascal而不是Java.
我们正在尝试使用Hibernate将Java 7 Spring MVC应用程序部署到IBM WebSphere 8.5.5.2服务器中.应用程序在Tomcat服务器上运行良好,但我们无法在WebSphere中运行它.
堆栈跟踪输出如下:
[3/26/15 13:49:53:552 MDT] 00000066 AutowiredAnno I org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor <init> JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
[3/26/15 13:49:54:299 MDT] 00000066 LocalContaine I org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean createNativeEntityManagerFactory Building JPA container EntityManagerFactory for persistence unit 'default'
[3/26/15 13:49:54:339 MDT] 00000066 LogHelper Z org.hibernate.jpa.internal.util.LogHelper logPersistenceUnitInformation HHH000204: Processing PersistenceUnitInfo [
name: default
...]
[3/26/15 13:49:54:536 MDT] 00000066 Version Z org.hibernate.Version logVersion HHH000412: Hibernate Core {4.3.7.Final}
[3/26/15 13:49:54:543 MDT] 00000066 Environment Z org.hibernate.cfg.Environment <clinit> HHH000206: hibernate.properties not found
[3/26/15 13:49:54:546 …Run Code Online (Sandbox Code Playgroud) 我使用RADPHP XE2(来自Borland/Embarcadero)作为我的IDE.只是因为我多年来一直使用他们的IDE.我并不是在使用任何VCL组件,因为这是一个愚蠢的网页设计概念.
我想升级它正在使用的PHP.我在IDE之外安装了最新的PHP并运行.但IDE仍然使用5.2.是否有可能哄它使用新的?任何人的想法?
JBoss版本:4.2.3GA.这适用于apache tomcat 6.0.在JBoss中,我不得不添加以下设置:-Dorg.apache.catalina.STRICT_SERVLET_COMPLIANCE=false为了使前进工作,但现在当我加载页面时,我得到以下错误.感觉就像我这样做是以JBoss不喜欢的方式,但我还没有看到任何其他的例子.有谁知道让这个工作的方法?
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
...
@GET
@Path("/forward")
public String forward(
@Context final HttpServletRequest request,
@Context final HttpServletResponse response) throws Exception
{
RequestDispatcher dispatcher = request.getRequestDispatcher("/index.html");
dispatcher.forward(request, response);
return "";
}
Run Code Online (Sandbox Code Playgroud)
例外:
java.lang.ClassCastException: $Proxy114 cannot be cast to javax.servlet.ServletRequestWrapper
com.itt.scout.server.servlet.admin.config.ConfigController.forward(ConfigController.java:46)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$VoidOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:151)
com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:70)
com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:279)
com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:136)
com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:86)
com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:136)
com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:74)
com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1357)
com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1289)
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1239)
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1229)
com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:420)
com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:497)
com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:684)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
Run Code Online (Sandbox Code Playgroud) 我调用两个方法,第一个更新表,下一个在另一个表中插入记录.当第二个事务失败时,EJB不执行第一个事务的回滚.
这是我的支持bean:
@ManagedBean
@ViewScoped
public class TransactionTestBean implements Serializable {
@EJB
private TransactionTestService service;
public String loadView() {
return "/test/transactionTest";
}
public void test() {
try {
service.updateTest();
} catch (Exception e) {
}
}
}
Run Code Online (Sandbox Code Playgroud)
EJB接口:
@Local
public interface TransactionTestService {
void updateTest() throws CustomException;
}
Run Code Online (Sandbox Code Playgroud)
EJB类:
@Stateless
@TransactionManagement
public class TransactionTestServiceImpl implements TransactionTestService {
@Resource(mappedName = "java:jboss/datasources/xxxxxDS", shareable = true)
public DataSource dataSource;
private TransactionTestDAO dao;
@PostConstruct
public void init() {
dao = new TransactionTestDAOImpl();
} …Run Code Online (Sandbox Code Playgroud) 我试图在头文件的类定义中定义字符串类型的变量.可能吗?例:
/* Foo.h */
#include <string>
class Foobar{
int a;
string foo;
}
Run Code Online (Sandbox Code Playgroud)
因为在某种程度上我可以声明一个字符串变量,但在标题中它不能识别我的字符串类型.
我已经设置了一个spring boot(v 1.1.9)应用程序来部署为WAR文件.我正在尝试将此Web应用程序与现有数据服务模块集成(作为maven依赖项添加).
尝试部署的环境:WebSphere Application Server 8.5.5.4
我面临的问题是当尝试在依赖数据服务模块中查找JNDI dataSource(jdbc/fileUploadDS)时,应用程序启动失败.
@Configuration
@Profile("prod")
public class JndiDataConfig implements DataConfig {
@Bean
public DataSource dataSource() throws NamingException {
Context ctx = new InitialContext();
return (DataSource) ctx.lookup("java:comp/env/jdbc/fileUploadDS");
}
}
Run Code Online (Sandbox Code Playgroud)
我的Spring Boot配置:
@Configuration
@ComponentScan(basePackages = { "au.com.aiaa.fileupload.data.*", "demo" })
@EnableAutoConfiguration(exclude = { HibernateJpaAutoConfiguration.class, DataSourceAutoConfiguration.class })
public class SampleApplication extends SpringBootServletInitializer {
public static void main(String[] args) {
SpringApplication.run(applicationClass, args);
}
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
return application.sources(applicationClass);
}
private static Class<SampleApplication> applicationClass …Run Code Online (Sandbox Code Playgroud) 我有一个Web应用程序,我在其中使用java.util.logging.在我的logging.properties文件中,默认级别是info.我的应用程序中有记录器用于所有级别的日志记录(信息,调试,致命等).此Web应用程序将部署在WebSphere 8上.
如果我想在运行时通过WAS管理控制台更改日志记录级别,从信息到错误,应用程序怎么办?我怎样才能做到这一点?
我需要使用EJB 3.1异步方法每天处理大约250.000个文档,以便应对整个长期任务。
我这样做是为了使用更多的线程并同时处理更多的文档。这是伪代码示例:
// this returns about 250.000 documents per day
List<Document> documentList = Persistence.listDocumentsToProcess();
for(Document currentDocument: documentList){
//this is the asynchronous call
ejbInstance.processAsynchronously(currentDocument);
}
Run Code Online (Sandbox Code Playgroud)
假设我有一个大小为10和4核心处理器的线程池,我的问题是:
我使用Java EE 6和WebSphere 8.5.5.2
我在eclipse中有一个WebSphere Application Server V8.5 Liberty Profile.我的webapp一直在给java.lang.OutOfMemoryError,因此我需要增加堆大小.
由于这个和这篇文章建议我改变了server.xml,通过添加jvmEntries标签(以前没有):
<server description="new server">
<!-- Enable features -->
<featureManager>
<feature>jsp-2.2</feature>
<feature>localConnector-1.0</feature>
<feature>jpa-2.0</feature>
</featureManager>
<!-- To access this server from a remote client add a host attribute to
the following element, e.g. host="*" -->
<httpEndpoint httpPort="9080" httpsPort="9443" id="defaultHttpEndpoint" />
<jvmEntries initialHeapSize="1024" maximumHeapSize="2048" />
<applicationMonitor updateTrigger="mbean" />
<webApplication id="app" location="app.war"
name="app" />
</server>
Run Code Online (Sandbox Code Playgroud)
但是eclipse将它显示为无效标记,并出现以下错误:
cvc-complex-type.2.4.a:从元素'jvmEntries'开始发现无效内容.其中一个'{include,variable,trustAssociation,applicationMonitor,application,classloading,basicRegistry,bundleRepository,osgiApplication,authentication,authCache,jaasLoginModule,jaasLoginContextEntry,cdiContainer,channelfw,tcpOptions,library,collectiveMember,hostAuthInfo,managedExecutorService,connectionManager,contextService,distributedMap, enterpriseApplication,web应用,httpDispatcher,MIME类型,httpEncoding,虚拟主机,httpOptions,httpAccessLogging,httpEndpoint,的authData,数据源,jdbcDriver,jndiEntry,JPA jspEngine,文件集,执行者,的FeatureManager,配置,customLdapFilterProperties,edirectoryLdapFilterProperties,domino50LdapFilterProperties,netscapeLdapFilterProperties,ldapRegistry,securewayLdapFilterProperties, iplanetLdapFilterProperties,idsLdapFilterProperties,activedLdapFilterProperties,logging,ltpa,ejbContainer,monitor,oauthProvider,oauth-roles,remoteFileAccess,administrator-role,
quickStartSecurity,pluginConfiguration,w ebContainer,httpSession,httpSessionDatabase,sslDefault,keyStore,ssl,sslOptions,timedOperation,transaction,webAppSecurity,federatedRepository,zosLogging,authorization-roles}'是预期的.
那么我应该如何增加堆大小呢?
java ×3
websphere ×3
websphere-8 ×2
asynchronous ×1
c++ ×1
datasource ×1
eclipse ×1
ejb ×1
ejb-3.1 ×1
header ×1
hibernate ×1
http ×1
ide ×1
java-ee ×1
jax-rs ×1
jboss-4.2.x ×1
jboss7.x ×1
jms ×1
jndi ×1
jpa ×1
jsp ×1
logging ×1
php ×1
radphp ×1
rollback ×1
spring-boot ×1
spring-mvc ×1
string ×1
war ×1